RATS 10.1
RATS 10.1

Procedures /

BJAUTOFIT Procedure

Home Page

← Previous Next →

@BJAutofit chooses the model for the series which minimizes one of the information criteria. It uses maximum likelihood estimation to ensure that the estimates are done over a consistent time interval. @GMAUTOFIT is a related procedure which can handle seasonal models.

@BJAutoFit(PMAX=maximum AR,QMAX=maximum MA, other options ) y  start end

Parameters

y

dependent variable

start, end

estimation range. Don't adjust this for lags lost to differencing. By default, range of y. Since the procedure uses maximum likelihood, no data points are lost beyond those required for differencing.

Options

PMAX=maximum number of AR lags to consider [0]

QMAX=maximum number of MA lags to consider [0]
 

DIFFS=number of preliminary differences [0]

SDIFFS=number of preliminary seasonal differences[0]

 

CRIT=[AIC]/BIC/SBC/HQ/CAIC

Criterion to use:

AIC is (uncorrected) Akaike information criterion.

BIC and SBC are synonyms for Bayesian or Schwarz criterion.

HQ is Hannan-Quinn.

CAIC is the AIC-corrected for degrees of freedom

 

DEMEAN/[NODEMEAN]

Extract mean before estimating ARMA models

 

CONST/[NOCONST]

Estimate mean as part of model

 

[PRINT]/NOPRINT

Controls whether the table is displayed

 

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

Variables Defined

%%AUTOP

number of AR parameters selected (INTEGER)

%%AUTOQ

number of MA parameters selected (INTEGER)

Example

This examines all combinations of up to 5 AR and 5 MA's. It then estimates the model using the automatically selected lag lengths. @BJAUTOFIT is used in quite a few of the brockwell-davis textbook examples.

 

*

* Brockwell & Davis, Introduction to Time Series and Forecasting, 2nd ed.

* Example 7.6.1 from page 248

*

open data djaopc2.tsm

data(format=free,org=columns) 1 250 dj ao

*

@YuleVar(lags=1,model=multiv)

# dj ao

diff(center) ao / cao

@bjautofit(pmax=5,qmax=5) cao

boxjenk(ar=%%autop,ma=%%autoq,maxl,constant,define=univ) ao

Sample Output

In the output, small is good. The chosen (starred) model is the MA(1), which is a very slight favorite over the AR(1).

 

AIC analysis of models for series CAO

   MA

AR   0        1         2        3        4        5

 0 644.5251 642.3675* 643.2832 645.2640 645.7011 646.1733

 1 642.9973 643.5339  645.2780 644.7359 645.4716 645.4268

 2 643.4294 645.1602  643.9680 645.2888 645.1213 643.5164

 3 644.7642 646.2432  645.8923 647.2558 644.9173 654.2456

 4 646.3510 645.8096  643.3337 647.3534 645.8569 645.7304

 5 646.8574 646.1789  643.4496 645.1205 645.9454 647.2321


 


Copyright © 2025 Thomas A. Doan