RATS 11
RATS 11

Procedures /

ADFAUTOSELECT Procedure

Home Page

← Previous Next →

@ADFAutoSelect is a procedure for selecting or aiding in the selection of the number of lags in an ADF test. It offers four different criteria for selection, and (optionally) can produce a table which includes all of them, or it can (silently) choose the lag length based upon a specific choice for the criterion. However, it is not so much designed for producing a final ADF test as it is for choosing the lag length for use in later calculations. The table produced by the PRINT option includes the ADF test, but this is an ADF test using only the data range permitted by the maximum number of lags, not the range that would be used for an ADF test for that specific number of lags. If you're just trying to do an ADF test and you know which selection criterion you want to use, use the @DFUNIT procedure instead.

 

 

@ADFAutoSelect( options ) series start end

Parameters

series

series to analyze

start  end

range of series to use (not range over which test is run). By default, the defined range of series.

Options

 

DET=NONE/[CONSTANT]/TREND

Chooses the deterministic components

 

MAXLAG=maximum number of lags to consider [Schwert's 12(n/100)**.25]

MINLAG=minimum number of lags to consider [0]

 

CRIT=[AIC]/BIC/HQ/MAIC

Criterion to use in selecting lag length. AIC is Akaike IC, BIC is Schwarz Bayesian IC, HQ is Hannan-Quinn and MAIC is Perron and Ng's modified AIC.

 

YD=(input) GLS detrended series [not used]

 

PRINT/[NOPRINT]

 Prints a table for the various criteria

TITLE=title of report ["Information Criteria for ADF Lag Lengths"]

Variables Defined

%%LAGS

chosen number of lags

%%AUTOP

chosen number of lags (also)

%CDSTAT

ADF test statistic at the chosen lag

Example

*

* Greene, Econometric Analysis, 7th Edition

* Example 23.3 and 23.4 from pp 957-959

*

open data tablef5-2.txt

calendar(q) 1950

data(format=prn,org=columns) 1950:01 2000:04 year qtr realgdp realcons $

 realinvs realgovt realdpi cpi_u m1 tbilrate unemp pop infl realint

*

set loggdp  = log(realgdp)

*

* ADFAutoSelect does a sequence of DF tests and displays a table of

* criteria which can be used to select the lag length. The final column

* has the test statistic. This differs from  the one in the stand-alone

* DFUNIT because ADFAutoSelect uses only the data points allowed when 14

* lags are included, while DFUNIT (by default), uses the maximum range

* allowed with the number of lags used on it.

*

@adfautoselect(maxlags=14,det=trend,print) loggdp

@dfunit(lags=1,det=trend) loggdp

*

@ppunit(lags=4,det=trend) loggdp

*

* KPSS test (example 22.4)

*

@kpss(lags=10,det=constant) loggdp

@kpss(lags=10,det=trend) loggdp


 

Sample Output

Information Criteria for ADF Lag Lengths, Series LOGGDP

Lags AIC      BIC      HQ       MAIC     ADF

   0  -9.274   -9.223   -9.253   -9.275   -1.700

   1  -9.399   -9.330*  -9.371*  -9.365   -2.444

   2  -9.400*  -9.315   -9.366   -9.351   -2.674

   3  -9.391   -9.288   -9.350   -9.348   -2.513

   4  -9.386   -9.266   -9.338   -9.353   -2.301

   5  -9.389   -9.251   -9.333   -9.368*  -2.024

   6  -9.382   -9.228   -9.320   -9.354   -2.129

   7  -9.372   -9.200   -9.302   -9.344   -2.091

   8  -9.362   -9.173   -9.285   -9.337   -2.007

   9  -9.357   -9.151   -9.273   -9.324   -2.128

  10  -9.347   -9.124   -9.257   -9.310   -2.167

  11  -9.337   -9.097   -9.240   -9.304   -2.079

  12  -9.343   -9.085   -9.238   -9.323   -1.822

  13  -9.334   -9.060   -9.223   -9.318   -1.733

  14  -9.326   -9.035   -9.208   -9.307   -1.789


Copyright © 2025 Thomas A. Doan