RATS 11
RATS 11

Procedures /

MAAUTOLAGS Procedure

Home Page

← Previous Next →

@MAAUTOLAGS quickly scans a set of moving average models 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 does a similar "quick" calculation for choosing a pure MA process. @BJAUTOFIT and @GMAUTOFIT do more time-consuming calculations (they do exact maximum likelihood fits) for choosing full ARMA models. (@GMAUTOFIT is for seasonal ARMA models).
 

@MAAutoLags( options )series  start  end

Parameters

series

series to analyze

start, end

range of series to use (by default, the maximum possible)

Options

MAXLAGS=maximum number of lags to consider [25]
 

CRIT=[AIC]/BIC/CAIC/HQ

Criterion to use:

AIC is (uncorrected) Akaike information criterion.

BIC is the Bayesian or Schwarz criterion.

HQ is Hannan-Quinn.

CAIC is the AIC-corrected for degrees of freedom
 

TABLE/[NOTABLE]

Show full table of results (not just best)

Variables Defined

%%AUTOQ

number of parameters selected (INTEGER)

Example

open data dowj.dat

data(format=free,org=columns) 1 78 dowj

*

set ddow = dowj-dowj{1}

*

@maautolags(maxlag=17,crit=bic,table) ddow

boxjenk(ma=1,maxl,demean) ddow

boxjenk(ma=2,maxl,demean) ddow

boxjenk(ma=3,maxl,demean) ddow

 

Sample Output

In the output, small is good. The chosen (starred) model is the MA(1).


 

Lags  IC

0        -1.659

1        -1.798*

2        -1.755

3        -1.699

4        -1.669

5        -1.613

6        -1.569

7        -1.515

8        -1.482

9        -1.427

10        -1.371

11        -1.336

12        -1.297

13        -1.291

14        -1.244

15        -1.231

16        -1.186

17        -1.172

 


Copyright © 2025 Thomas A. Doan