On this page

Time series concepts

Some data is not a sample of separate cases but one thing measured again and again: a shop’s takings each day, a patient’s blood pressure each visit, a country’s unemployment each month. The rows have an order, and the order carries information – this month resembles last month, and December resembles last December – which is exactly what ordinary statistics assumes away when it treats the rows as independent. This page explains the ideas a time series analysis turns on, in the order the time series analysis module meets them: what a series and its lags are, how a trend and a seasonal pattern differ and what a seasonal period is, what a stationary series is and how differencing gets you one, what to do when the swings grow with the level, and what an outlier means when the neighbours matter; then the ideas its analysis methods turn on – how the ACF and PACF plots are read, what a decomposition and its strengths are, how the stationarity tests ask their opposite questions, what a moving average and exponential smoothing do, how an ARIMA model is written, how a forecast’s accuracy is measured honestly, what a periodogram shows, and what a structural break is. The module asks for a time variable – the column that orders the rows – one or more series to analyse, and optionally a grouping variable that splits the rows into separate series. The café data holds no time column, so the numbers on this page come from the series every time series textbook opens with: the monthly totals of international airline passengers, in thousands, from January 1949 to December 1960 – 144 months – published by Box and Jenkins in 1970 and shipped with R as AirPassengers. Type the table below into a spreadsheet as two columns – month holding the first day of each month (1949-01-01, 1949-02-01, …) and passengers holding the count – save it as CSV and load it into the module: pick month as the time variable and passengers as the series, and the frequency is detected as 12 from the monthly spacing. Every number on this page is reproduced with the other options at their defaults.

Year Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
1949 112 118 132 129 121 135 148 148 136 119 104 118
1950 115 126 141 135 125 149 170 170 158 133 114 140
1951 145 150 178 163 172 178 199 199 184 162 146 166
1952 171 180 193 181 183 218 230 242 209 191 172 194
1953 196 196 236 235 229 243 264 272 237 211 180 201
1954 204 188 235 227 234 264 302 293 259 229 203 229
1955 242 233 267 269 270 315 364 347 312 274 237 278
1956 284 277 317 313 318 374 413 405 355 306 271 306
1957 315 301 356 348 355 422 465 467 404 347 305 336
1958 340 318 362 348 363 435 491 505 404 359 310 337
1959 360 342 406 396 420 472 548 559 463 407 362 405
1960 417 391 419 461 472 535 622 606 508 461 390 432

The series runs from 112 thousand passengers in January 1949 to 432 in December 1960; its lowest month is November 1949 (104) and its highest July 1960 (622). Read across a row and the summer bulge is visible in every year; read down a column and every month climbs.

A series and its lags

A time series is one variable observed at successive times – one value per time point, in time order – and its defining property is that the values are not independent of each other: what the series does next depends on where it is now. Ordinary methods treat each row as a fresh draw, so on a series they overstate how much evidence they hold, and a regression on it produces p-values that are too small and trends that are really slow drift. Time series methods model the dependence instead of assuming it away: they describe how a value relates to the values before it, and use that relation to explain the series and to extend it. The airline table is one series of 144 monthly values; the module treats each selected column as its own series, and a grouping variable splits a column into one series per group.

Autocorrelation at a lag is the correlation between the series and a copy of itself shifted back by a number of steps – the lag – so the lag-1 autocorrelation pairs each month with the month before, and the lag-12 autocorrelation pairs each month with the same month a year earlier. It is the series’ own version of autocorrelation, the dependence between neighbours in an order, computed at every lag in turn. On the airline series the lag-1 autocorrelation is 0.95 – a month is almost a copy of the month before – and the lag-12 autocorrelation is 0.76, the yearly echo. A lag-1 value near 1 says the series moves slowly and smoothly; a spike at lag 12 in monthly data says a yearly cycle is present; values near zero at every lag say the series is noise with nothing to model. The module’s exploration card plots the autocorrelation at every lag out to at least two seasonal periods, which is where these numbers are read off.

Trend, seasonal pattern and the seasonal period

Trend is the slow movement of the series’ level over the whole record – the part that would remain if every short-term wobble and every repeating cycle were averaged away. The airline series trends upwards throughout: the 1949 months average 127 thousand passengers, the 1960 months 476, nearly four times as many, and no year’s average is below the year before. A trend is what a plot shows most plainly and what most methods need to be told about: a model that assumes a stable level will lag behind a trending series forever, and a straight line fitted through a series with a cycle will read the cycle as scatter.

Seasonal pattern is a movement that repeats at a fixed interval – the summer peak of travel, the weekend dip of office traffic, the December spike of retail – so that the value at a given position in the cycle is predictable from the same position in earlier cycles. Every row of the airline table has its high in July or August and its low in November or February, and the swing grows with the level: July exceeds its year’s average by 21 thousand in 1949 and by 146 thousand in 1960. That growth is the difference between an additive seasonal pattern, a swing of constant size, and a multiplicative one, a swing of constant proportion, and it is why the same series can need a Box-Cox transformation before an additive model fits it. A pattern that repeats but at no fixed interval – business cycles, epidemics – is a cycle, not a season, and no seasonal method captures it.

Seasonal period – called the frequency in the module – is the number of observations in one cycle of the seasonal pattern, not a rate in hertz: monthly data with a yearly pattern has period 12, quarterly data with a yearly pattern 4, daily data with a weekly pattern 7, hourly data with a daily pattern 24. Every seasonal method needs this one number to know what “the same season” means, and it is the number the module reads off the spacing of your time variable – rows a month apart suggest 12 – and lets you override. A wrong period is the commonest way to get a wrong answer from a right method: at period 1 no seasonal model can be fitted at all, and at a period the data does not have the seasonal terms fit noise. The airline months are 28 to 31 days apart, which the module reads as monthly and a period of 12; the pre-flight’s own search of the series’ spectrum, made without looking at the dates, finds 12 as well.

Stationarity and differencing

Stationarity is the property of a series whose statistical character does not change along its length: a stable mean, a stable spread, and an autocorrelation that depends only on the lag between two values, not on where in the series they sit. Most of the theory behind ARMA models, autocorrelation plots and unit-root tests assumes it, and a series with a trend or a seasonal pattern is not stationary – its mean moves. The airline series fails on every count: its yearly mean climbs from 127 to 476, its yearly standard deviation grows from 14 to 78, and its every-twelve-months echo means the autocorrelation depends on the season as well as the lag. The route from such a series to a stationary one is differencing, and the module’s pre-flight reports how many differences it takes; the exploration card then tests the result with stationarity tests whose reading the manual explains.

Differencing replaces each value by its change from the previous one – yt−yt−1, this month minus last month – and is the standard way to remove a trend: a series that climbs steadily has differences that hover around a constant, and a series that wanders has differences that stay put. The number of times it is applied is the d of an ARIMA model, and the pre-flight’s Suggested d (ndiffs) is that number as the app’s tests recommend it: 1 for the airline series. Its 143 monthly changes average +2.2 thousand passengers with a standard deviation of 34, and their lag-1 autocorrelation falls from the raw series’ 0.95 to 0.30 – the smooth climb is gone. Differencing cannot be undone by a model that never saw the level, which is why the module never differences a series before handing it to exponential smoothing or theta, and why ARIMA differences inside its own fit.

Seasonal differencing replaces each value by its change from the same position one cycle earlier – yt−yt−m with m the seasonal period, this July minus last July – and removes a seasonal pattern the way ordinary differencing removes a trend. Its count is the D of a seasonal ARIMA model, and the pre-flight’s Suggested D (nsdiffs) is the app’s recommendation: 1 for the airline series, where the ordinary differences still carry a lag-12 autocorrelation of 0.83 – the yearly echo survives the first difference and needs the seasonal one. A series that needs both, differenced once regularly and once seasonally, is the classic airline case, and the model that fits the result is the one known as the airline model.

Variance that grows with the level

Box-Cox transformation is the family of power transforms y(λ)=(yλ−1)/λ, with the natural logarithm at λ = 0, applied to a series whose swings grow with its level so that an additive model fits the transformed series: λ = 1 leaves the series as it is, λ = 0.5 is a square root, λ = 0 the log, and Guerrero’s method picks the λ that makes the spread of each cycle least dependent on its mean. The airline series is the textbook case: its yearly standard deviation grows from 14 in 1949 to 78 in 1960 – a ratio of 5.7 – while on the log scale the two are 0.11 and 0.16, a ratio of 1.4; the module’s automatic estimate for the raw series is λ = −0.29, a shade stronger than the log, since on the log scale the yearly spread still grows a little. The transform needs a strictly positive series – a zero or a negative value has no power of that kind – so a series that crosses zero has to be shifted first, and the module says when it has skipped the step for that reason. Fitted values and forecasts are transformed back to the original scale, so the reader never reads a logged passenger count.

Outliers in a series

Outlier in a time series is a value that stands out from what its neighbours and its season predict, not from the series’ overall distribution – a July of 622 is the highest value of the airline series and no outlier, while a July of 400 in 1960 would be one. The module’s outlier scan fits a robust trend and season, takes the residuals, and flags a residual beyond three interquartile ranges from the quartiles; the general outlier rules that judge a value against the whole distribution would flag the wrong points here. The scan is only as good as the fit it is judged against: on the airline series it flags seven summer peaks – the Julys of 1949 to 1951, the Augusts of 1958 and 1959, and July and August 1960 – because their swing grows with the level and an additive season cannot follow it, so the largest peaks read as excess. They are genuine highs, not errors, and the pre-flight lists them so that the decision to replace them stays with the reader.

Reading the autocorrelation plots

Autocorrelation function (ACF) is the autocorrelation at a lag computed for every lag from 1 upward and drawn as a bar chart – the correlogram – with a dashed band at ±1.96/√n, the range a bar would stay inside if the series were pure noise; a bar reaching outside the band is a correlation the series’ length can support. The shape is what you read, not the single bars: bars that fade slowly toward zero say the series is dominated by a trend or wanders without a fixed level – it is not stationary – and bars that rise again at the seasonal lag and its multiples say the season is there. On the airline series every one of the 24 bars stands far outside the ±0.16 band: the ACF falls from 0.95 at lag 1 to 0.66 at lag 8, climbs back to 0.76 at lag 12, and is still 0.53 at lag 24 – the slow fade of a trend with the yearly echo riding on it. A series whose ACF cuts off sharply after lag q – a few big bars, then nothing – is one a moving-average model of order q fits.

Partial autocorrelation function (PACF) is the correlation between the series and its value k steps back once the values in between have been accounted for – how much lag k adds on its own, beyond what the shorter lags already explain. The lag-1 PACF equals the lag-1 autocorrelation, since there is nothing in between; the airline PACF then drops to −0.23 at lag 2, stays inside the band until lag 9, and spikes to −0.54 at lag 13 – the seasonal lag plus one, the signature of a series that needs a seasonal difference. A PACF that cuts off after lag p while the ACF fades is the signature of an autoregressive model of order p; the mirror – ACF cuts off, PACF fades – points to a moving-average model. These are rough guides for choosing ARIMA orders, not rules, and the automatic order search does the same reading numerically.

White noise is a series with no structure at all – independent values around a constant mean with a constant spread – so that nothing about its past predicts its next value and every autocorrelation is zero apart from sampling noise. It is what a model’s residuals should look like once the model has taken everything predictable out, and it is the null hypothesis of the Ljung-Box test. The raw airline series is as far from white noise as a series gets: its Ljung-Box statistic over 24 lags is Q = 1606, against a value near 24 for noise, p < .001.

Ljung-Box test adds up the squared autocorrelations over the first h lags, weighted for the series length, into a statistic Q that is compared with a chi-square distribution: a small p says at least one of those autocorrelations is real. Run on a raw series it asks whether there is anything to model; run on a model’s residuals it asks whether the model missed anything, and the degrees of freedom are reduced by the number of parameters the model estimated, since fitting them used up some of the series’ freedom. On the airline series the multiplicative Holt-Winters fit leaves Q(24) = 40.2 on 8 degrees of freedom, p < .001 – the residuals still carry structure the fit did not capture – while the automatic ARIMA’s residuals give Q(24) = 41.8 on 23 degrees of freedom, p = .010, a rejection at the app’s default level for assumption checks.

Decomposition

Decomposition splits a series into three components that add up to it – a trend, a seasonal pattern and a remainder – so each can be looked at alone: observed = trend + seasonal + remainder, or the product of the three in the multiplicative form, for a swing that grows with the level. The classical method estimates the trend by a centred moving average one season wide and the seasonal component as the average deviation from the trend at each position in the cycle, the same for every cycle; STL – seasonal-trend decomposition by loess – fits both with local regressions, can let the seasonal shape drift slowly across cycles when it is allowed to, and in its robust form lets an outlying month bend the fit very little. The remainder is what neither component explains, and a remainder far from the rest is where the module flags an anomaly point. On the airline series the STL trend climbs from 123 to 477 thousand while the seasonal component swings between −49 and +40 thousand around it; because the module fixes the seasonal shape across cycles, the later summers – whose swing is far larger than the early ones – leave remainders of up to 129 thousand, and 18 of the 144 months are flagged as anomalies, June to August of 1956 to 1960 among them. That is the additive decomposition’s way of saying the season is multiplicative; the Box-Cox transformation or the multiplicative form is the answer.

Trend strength and seasonal strength are two numbers between 0 and 1 that say how much of the series’ variation each component accounts for, so that “strong trend” and “strong season” have a scale: the trend strength is 1−Var⁡(R)/Var⁡(T+R) – one minus the share of the trend-plus-remainder variation that the remainder alone holds – and the seasonal strength is the same with the seasonal component in place of the trend, both cut off at 0 when the remainder is larger than the sum. Near 1 the component dominates; near 0 it is scarcely there. The airline series scores 0.94 for trend and 0.62 for season on the module’s STL: the climb is almost the whole story, and the season is clear but, with the swing growing over the years and a fixed seasonal shape, a third of its variation is left in the remainder.

Testing for stationarity

Unit-root test asks whether a series wanders without a fixed level – has a unit root, the technical name for a series whose shocks accumulate rather than fade, of which a random walk is the simplest case – against the alternative that it returns to a level or a trend line. The augmented Dickey-Fuller test and the Phillips-Perron test both hold the unit root as their null hypothesis, so a small p rejects it and says the series looks stationary, while a large p is not proof of a unit root but a failure to rule one out; the module runs both with a drift and a straight-line trend in the alternative, so a series that fluctuates stably around a trend counts as stationary for them. On the airline series the ADF statistic is −7.32 and the Phillips-Perron statistic −5.05, both with p < .01: around its trend the series’ fluctuations do not accumulate, so the tests call it stationary – which is not the same as saying it is ready to model, since the trend is still there.

KPSS test asks the opposite question: its null hypothesis is that the series is stationary – around a constant mean in the level form, around a straight-line trend in the trend form – so a small p rejects stationarity and says the series wanders. Because the two nulls face each other, the pair is read together: a unit-root test rejecting and KPSS not rejecting is a clear stationary verdict, KPSS rejecting and the unit-root test not rejecting a clear unit root, neither rejecting a sample too short to tell, and both rejecting a series that fits neither description – a deterministic trend the KPSS null did not allow for, a break in level, or a variance that changes over time. The airline series is the last case at the module’s defaults: ADF rejects the unit root, and the level-form KPSS, at 2.74 with p < .01, rejects a constant mean – a trending series with a growing swing, which is what the two tests together diagnose. Switch the KPSS null to its trend form to ask whether the fluctuations around the trend are stable, which is the question ADF was answering.

Smoothing

Moving average replaces each value by the mean of a window of neighbouring values centred on it – with a window of 12 on monthly data, the six months before, the six after and the month itself, weighted so the window stays centred – and so filters the season and the noise out of the plot, leaving the trend to read. It is a filter, not a model: it has no parameters to estimate, no likelihood and no residuals to test, and it says nothing about the future, since a centred window has nothing to average at the ends – a 12-month window over the 144 airline months leaves 132 smoothed points and loses six at each end. Its window should be the seasonal period when the aim is to remove the season, which is what the module seeds it to.

Exponential smoothing forecasts a series from a weighted average of its past, the weights falling off geometrically so that the latest observation counts most: a smoothing parameter α between 0 and 1 says how fast – at α near 1 the smoothed level is the last value, at α near 0 it is the long-run mean. Simple exponential smoothing (SES) tracks a level alone, Holt’s method adds a trend with its own parameter β, and Holt-Winters adds a seasonal component with a third parameter γ, additive when the seasonal swing is constant and multiplicative when it grows with the level; a damped trend flattens the extrapolation instead of continuing the line forever, which is usually safer over a long horizon. The whole family is written ETS(error, trend, season) – ETS(A,N,N) is SES, ETS(A,Ad,N) damped Holt, ETS(M,A,M) multiplicative Holt-Winters – and the automatic ETS forecaster picks the form by information criterion. On the airline series SES estimates α = 1.00, the naïve forecast in disguise, with a training RMSE of 33.6 thousand passengers, while multiplicative Holt-Winters – ETS(M,A,M), α = 0.31, β = 0.01, γ = 0.60 – brings it down to 10.6 and a mean absolute percentage error of 2.9%: the level updates briskly, the trend hardly moves from its initial estimate, and the seasonal indices adapt fast.

ARIMA models

ARIMA model – autoregressive integrated moving average – explains a series by its own past in three parts, each with an order: p autoregressive terms, which regress today’s value on the p values before it; d differences, which turn a trending series into a stationary one before the other two parts are fitted, so that ARIMA(p, 1, q) models the changes rather than the levels; and q moving-average terms, which regress today’s value on the q most recent forecast errors. The orders are the model, and choosing them is what the ACF and PACF are read for; the automatic search tries the grid and picks the orders with the lowest information criterion, adding a constant – a mean on an undifferenced series, a drift on a differenced one – where it helps. On the airline series the automatic search picks ARIMA(0,1,1)(0,1,0)[12]: one regular and one seasonal difference, then a single moving-average term of −0.32 on the differenced series, with an AICc of 1020.7, a training RMSE of 11.2 and a MASE of 0.26 – a quarter of the seasonal naïve error.

Seasonal ARIMA (SARIMA) adds a second set of the same three parts at the seasonal lag – P seasonal autoregressive terms, D seasonal differences and Q seasonal moving-average terms, the seasonal lag being the period m – and is written ARIMA(p, d, q)(P, D, Q)[m]: a term at lag m relates this July to last July the way a regular term relates it to June. ARIMA(0,1,1)(0,1,1)[12] reads as one regular difference, one seasonal difference over a period of 12, one regular and one seasonal moving-average term – the airline model, named because it was built for this very series in its logged form. Fitted by hand to the raw airline counts it estimates the two terms at −0.31 and −0.11 with an AICc of 1021.2, a hair behind the automatic pick; the module’s grid of neighbouring orders shows that ARIMA(1,1,2)(1,1,2)[12] would reach 1013.2, a gain of eight AICc points for four more parameters, which is what the grid is for. Above a period of about 24 the seasonal terms stop converging, which is why the module warns at that point and names STL-based methods as the alternative.

Forecasting and its accuracy

Forecast accuracy is how far a method’s forecasts land from the values that later arrived, and the honest way to measure it is out of sample: a model’s fit to the data it was estimated on – the training or in-sample error, and the information criteria beside it – says how well it describes the past, not how well it will forecast, and a flexible model describes the past better than it forecasts. The two designs that give an out-of-sample answer are a holdout and rolling-origin cross-validation, and every accuracy measure – RMSE, MAE, MAPE, MASE – can be computed in either. The module’s horse-race scores every forecaster the same way on the same windows and ranks them by one measure, so the comparison is fair; the winner on the airline series is Auto-ARIMA, with a cross-validated RMSE of 27.0 thousand passengers to ETS’s 30.5 and the naïve method’s 90.4.

Naïve forecasts are the two baselines every method has to beat: the naïve forecast carries the last observed value forward unchanged, and the seasonal naïve forecast repeats the value from the same position one cycle earlier – next July is last July. They cost nothing and they are hard to beat on a stable series, which is why a method that beats them by little has not earned its complexity; a drift forecast, the naïve value plus the series’ average change per period, is the baseline for a trending series. On the airline series the naïve forecast for January 1961 is December 1960’s 432, with a 95% interval of 366 to 498; its cross-validated RMSE is 90.4 and the seasonal naïve’s 42.5, against 27.0 for the winner.

Holdout evaluation sets aside the last stretch of the series – the module takes the forecast horizon, or a fifth of the observations when that is smaller – fits every method on the observations before it, forecasts the stretch and scores the forecasts against what actually happened there. It is the simplest honest test, and it answers for one window only: a method can be lucky or unlucky on that particular stretch, and a break or an unusual season inside it colours every score. With a horizon of 12 the airline holdout is the twelve months of 1960; on them Auto-ARIMA’s RMSE is 23.9 and its MASE 0.61.

Rolling-origin cross-validation repeats the holdout test from several origins: the series is cut at one point, the methods are fitted on everything before it and forecast the next horizon, the cut moves back a full horizon and the exercise repeats, so that each origin’s forecast window is a different, non-overlapping stretch of the series, and the errors are pooled across all of them. Averaged over several windows the score is closer to a method’s expected forecast error and far more stable than one holdout, which is why the module ranks by it whenever it can run; each origin costs a horizon of length, so a short series supports few. On the airline series five origins a year apart – the last five years – give Auto-ARIMA a pooled RMSE of 27.0 and a MASE of 0.71, ETS 30.5 and 0.81, the theta method 33.3 and 0.90: the order a single holdout suggested, now on five windows instead of one.

RMSE – the root mean squared error – squares each forecast error, averages the squares and takes the root, so a few large misses weigh more than many small ones; it is in the series’ own units and is the measure most methods are tuned to. MAE – the mean absolute error – averages the sizes of the errors without squaring, the typical miss in the series’ units. Both are on the scale of the series, so a value on one series says nothing against a value on another; on the airline series Auto-ARIMA’s cross-validated RMSE of 27.0 and MAE of 20.8 are in thousands of passengers a month.

MAPE – the mean absolute percentage error – expresses each error as a percentage of the actual value and averages them, so it reads without units: Auto-ARIMA’s forecasts on the airline series miss by 5.1% on average across the cross-validation windows, the naïve forecast’s by 15.1%. It has two flaws worth knowing: it is undefined when an actual value is zero and blows up near zero, so the module leaves it blank for a series that touches zero, and it punishes a forecast above the actual more than one the same distance below.

MASE – the mean absolute scaled error – divides a method’s mean absolute error by the mean absolute error the seasonal naïve forecast makes on the training data, so 1 means “as good as repeating last season”, below 1 better and above 1 worse, on any series in any units. It is the measure to compare across series, groups or datasets, and the one that tells you at a glance whether a model earns its keep: on the airline series Auto-ARIMA’s cross-validated MASE of 0.71 says its misses are 71% of the seasonal naïve’s, while the plain naïve method’s 2.30 says that ignoring the season more than doubles them.

Cycles in the frequency domain

Periodogram is the series’ variation laid out by frequency rather than by time: for every frequency the data can resolve – one cycle over the whole record up to one cycle every two observations – it gives the amount of the series’ variance a sine wave at that frequency would explain, so a cycle in the series shows as a peak at its frequency, and its period is one over that frequency. The frequencies come on a fixed grid of n/2 values, so a period that does not fall on a grid point is smeared over two neighbours and reported with a resolution – 12 ± 0.5 says the true cycle lies somewhere between 11.5 and 12.5 observations – and a peak’s significance can be tested against the flat spectrum white noise would give, which is Fisher’s g-test: the largest ordinate’s share of the total, with a p-value that already accounts for having searched the whole spectrum for it. The airline periodogram has 72 ordinates; the one at period 12 holds 50% of the total variance, p ≈ 10⁻²⁰, and the exploration card’s stepwise search finds seven significant periods in all, of which 12 and two weak long ones – 8 and 9.6 months, close to the noise – are fundamentals and the rest harmonics of 12.

Harmonic is a peak at a fraction of a fundamental period – P/2, P/3, P/4 – that a repeating pattern produces whenever its shape is not a pure sine wave: the airline summer is a peaked hump, not a smooth wave, so beside the peak at 12 months the periodogram holds real, significant peaks at 6, 4, 3 and 2.4 months, one cycle at each of a half, a third, a quarter and a fifth of a year. They are not separate seasons but the same yearly cycle described more sharply, which is why the module marks each with its parent and multiplier – Harmonic of 12 (×2) – and mutes the row; a frequency override should be chosen from the fundamental rows.

Structural breaks

Structural break – a change-point – is a date at which the series’ behaviour changes: its level jumps, or its slope changes, and stays changed, as distinct from a single outlier that returns to the line. The Bai-Perron method fits a model with a chosen number of segments and picks the break dates that minimise the total squared error, then chooses the number of breaks by an information criterion; each date comes with a confidence interval, since a break’s timing is only as precise as the data on either side of it allow. What counts as a break depends on the model: under a mean shift each segment has its own constant level, so a steadily trending series is read as a staircase of level steps – the airline series comes out with five breaks, in February 1951, February 1953, May 1955, February 1957 and March 1959, its segment means climbing from 134 to 464 thousand – while under a level and trend model each segment has its own line, and the same series has no break at all: one straight climb describes it. That disagreement is itself the finding – the series trends and does not jump – and it is why the model should be chosen before the breaks are read.

Where this appears in DataSuite

The time series analysis module is built on these ideas: its pre-flight reports the seasonal period, the suggested differences, the Box-Cox λ and the outliers for every series, its exploration card draws the ACF and PACF, decomposes the series and reports the strengths, runs the unit-root and KPSS tests and searches the periodogram for cycles, its transform stack applies the Box-Cox transformation and the outlier replacement, its smoothing and ARIMA cards fit the models and test their residuals for white noise, its forecasting card scores seven forecasters by holdout and rolling-origin cross-validation on RMSE, MAE, MAPE and MASE, and its spectral card draws the periodogram and searches for structural breaks. Data transformation offers a lag and a difference as rules when you want the shifted or differenced column in the dataset itself, and the regression module’s Durbin–Watson diagnostic and Newey–West standard errors are the answer when the rows of an ordinary regression turn out to be ordered.

A shopkeeper: the day → time variable, the day’s takings → series, the branch → grouping variable; a hospital: the week → time variable, admissions → series, the ward → grouping variable; a meteorologist: the hour → time variable, temperature → series, the station → grouping variable.