statable Statistics for study and research

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

Requirements and limits

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

Related

Open in Statable