How does a value develop over time? (time series)
In brief
You want to know how a value behaves over time - for example enrolments per month over ten years. Statable shows the course, a moving average and a trend line with an interval, checks whether successive values depend on each other (autocorrelation), and, if the series is long enough, separates trend, season and remainder. The trend describes the series in the observed period and does not say that it will continue like that. Statable calculates a forecast (ARIMA, automatic selection, smoothing) only on request, with a checklist.
What the table looks like
One row per point in time. You need the column with the value (a number) and the column with the point in time (a date such as 2024-03-01). Statable recognizes from the intervals whether the series is monthly, quarterly, yearly, weekly or daily; you can change this. Without a date the order of the rows applies; then the period has to be given (12 for months, 4 for quarters, 7 for weekdays, 1 for no season).
If single points in time are missing they stay gaps: Statable fills in nothing. The trend runs at the true position, the autocorrelation with up to 10% gaps as an approximation; the decomposition needs data without gaps over at least two full periods.
Reading the result
- The trend says by how much the value rises or falls on average per time step, with a 95% interval. If successive values depend on each other the ordinary interval is too narrow. Statable then also shows an interval with an effective sample size: the series counts as fewer independent values.
- The correlogram shows the autocorrelation per lag. Bars outside the lines (±1.96/√n) stand out; with many lags one is to be expected by chance alone. The Ljung-Box test checks all together. Durbin-Watson (near 2: no autocorrelation) is only a reminder and has no p here.
- The classical decomposition separates trend, season and remainder. Additive (season as a deviation) fits if the fluctuation stays the same size; multiplicative (season as a factor) if it grows with the level. Statable suggests one, the person chooses.
- The additive decomposition is the same as in SPSS. In the multiplicative one the seasonal factors differ by up to 0.4% (different method). SPSS smooths the trend up to the edges; in Statable it is missing for half a period at the start and at the end (as in R decompose).
Requirements and limits
- A trend in a series with strong autocorrelation can be chance (spurious trend). The statement "the trend differs from zero" is then less certain than the number looks.
- At least 10 values, better over 20. One value per point in time; the data assistant "Aggregate" combines several values. Unequal intervals (for example trading days) allow the course and the trend, but no autocorrelation and decomposition.
- Not included: differences as their own columns (the assistant "Shift and smooth" does that), tests for stationarity, structural breaks, several series. Calendar effects such as leap years or the number of working days are not corrected.
Reporting the result
Trend: b = 0.25 per month, 95% CI [0.19, 0.31] (effective sample size 22.7 instead of 120); R² = .75; Ljung-Box Q(24) = 410.1, p < .001
For specialists
Own code, checked against R 4.6 (stats: lm, acf, filter, decompose, Box.test; lmtest::dwtest). Trend with t(n − 2); with gaps at the true position (pushed together the slope would be wrong). Autocorrelation as in stats::acf (na.pass for gaps), limits ±1.96/√n. Ljung-Box with h = min(10, ⌊n/5⌋) or, with a season, min(2·period, ⌊n/5⌋). Effective sample size after Santer et al. (2000): n·(1 − r₁)/(1 + r₁), at least 3, only for r₁ > 0; interval with t(nEff − 2). Decomposition as in stats::decompose.
Typical examples
- Enrolments in a course per month over ten years: trend and semester pattern.
- Weekly measurements of a learning outcome: does it increase over the course?