Page 1 of 1

ARAutolags - procedure for choosing an AR

PostPosted: Wed Feb 25, 2009 2:00 pm
by TomDoan
This quickly scans a set of univariate autoregressions looking for the one which minimizes one of four information criteria. This can be used in ARMA model identification, and also for diagnostics (best lag should be zero if the series is serially uncorrelated).

arautolags.src
Procedure file
(3.07 KiB) Downloaded 22 times


@ARAutoLags( options ) series start end

Options
METHOD=[YULE]/BURG
Method used to compute the autocorrelations. YULE is more commonly used (it's the standard "textbook" calculation), but BURG is more accurate if the process is nearly non-stationary.

MAXLAGS=maximum number of lags to consider [25]
CRIT=[AIC]/BIC/CAIC/HQ
Criterion to use in selecting lags. CAIC is AIC corrected for degrees of freedom (usually called AICC).

TABLE/[NOTABLE]
If TABLE, show full table of results (not just best)

TITLE=title for table ["'criterion' analysis of 'series'"]

Variables Defined

%%AUTOP = best number of lags

Example

Code: Select all
*
* Brockwell & Davis, Introduction to Time Series and Forecasting, 2nd ed.
* Example 5.4.1 from page 149
*
open data lake.dat
calendar 1875
data(format=free,org=columns) 1875:1 1972:1 lake
@bjident(number=40) lake
@bjinitial(ar=2,method=burg) lake
@bjinitial(ar=2,method=yule) lake
@arautolags(maxlags=10,method=burg,crit=caic) lake
@arautolags(maxlags=10,method=yule,crit=caic) lake


lake.dat
Data file for example
(596 Bytes) Downloaded 20 times