ACF Procedure |
@ACF performs an autocorrelation analysis on a series. This is a simpler procedure than the related @BJIDENT and @REGCORRS.
@ACF( options ) series start end
Parameters
|
series |
series to analyze |
|
start, end |
range of series to use. By default, the defined range of series. |
Options
NUMBER=number of autocorrelations to compute[depends upon number of data points]
METHOD=YULE/[BURG]
This chooses the algorithm used for computing the autocorrelations. BURG is generally thought to be more accurate; YULE is simpler and more commonly used. If you're trying to reproduced published results, it's more likely they were done with YULE.
REPORT/[NOREPORT]
[GRAPH]/NOGRAPH
You can graph the autocorrelations and produce a table (with REPORT) or both. The default is to graph only.
[QSTATS]/NOQSTATS
Computes and displays Ljung-Box Q Statistics
DFC=degrees of freedom correction for Q statistics
TITLE="title of graph window and report window"
HEADER="header string for graph"
FOOTER="footer string for graph"
Example
*
* Delurgio, Forecasting Principles and Applications
* Example BIRTHMAR.DAT from pp 160-161
*
open data birthmar.dat
calendar(q) 1985
data(format=free,org=columns) 1985:1 1992:4 date birth marriages
*
@acf marriages
*
* The seasonal smoothing is done with ESMOOTH with the option
* SEASONAL=ADDITIVE. To get the model shown, you set the level smoothing
* parameter (called ALPHA) to 0, and the seasonal smoothing parameter
* (called DELTA) to the "alpha" value described (here .435).
*
esmooth(seasonal=additive,alpha=0,delta=0.435,initial=start,fitted=sesfore) marriages
@uforeerrors marriages sesfore 5 *
set residuals = marriages-sesfore
@acf(report) residuals 5 *
Sample Output
This is from the instruction in the example. The first is the graph; note the Q-statistic inserted into the bottom left. The second is the report window. This has the autocorrelations, partial autocorrelations and running Q statistics (that is, the LAG 1 row has the Q for lag 1, the LAG 7 row has the Q for the first 7 autocorrelations).


Copyright © 2026 Thomas A. Doan