Detailed description
Example
Code: Select all
*
* Greene, Econometric Analysis, 6th Edition
* Example 22.3 and 22.4 from pp 754-756
*
open data tablef5-1.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) loggdpCode: Select all
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