Autocorrelations
Shows how strongly a series is correlated with its own past values (ACF) and after removing shorter lags (PACF), with the Ljung-Box test of white noise.
Menu: Analyze → Forecasting → Autocorrelations…
When should I use it?
- Checking regression residuals for serial correlation.
- Spotting seasonality (spikes at lag 12 for monthly data).
What are the assumptions?
- Equally spaced observations with no gaps.
How do I run it in StatLab?
- Choose the series, the number of lags and the standard-error method.
- Use Difference / Seasonally difference to look at the ACF of a differenced series when identifying an ARIMA model.
How do I read the output?
| Output | Meaning |
|---|---|
| Autocorrelation | Correlation with the series k steps earlier. |
| Box-Ljung Statistic | Joint test that all autocorrelations up to lag k are zero. |
Worked example
On the practice survey dataset (File → Sample dataset), this command — which the dialog's Paste button also produces — runs the procedure:
PROC tsAcf /vars=(score age) /lags=16 /se=independence /pacf=YES /d=0 /D=0 /period=12.
Output tables: Autocorrelations · Partial Autocorrelations · Autocorrelations · Partial Autocorrelations.
Computed by StatLab's validated procedure code when this page was built. The example only illustrates the steps; choose variables that fit your own research question.
What are common mistakes?
- Running it on data that are not in time order.