/usr/share/gretl/scripts/misc/sw_ch12.inp is in gretl-common 2016a-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # Reproduce some of the time-series material in Stock and Watson,
# "Introduction to Econometrics", 1e, chapter 12
open sw_ch12.gdt
# S & W use White's standard errors in this chapter,
# not HAC.
set force_hc on
set hc_version 1
# generate inflation rate
series infl = 400 * log(PUNEW/PUNEW(-1))
diff infl
lags d_infl LHUR
smpl 1962:1 1999:4
# equation 12.7
ols d_infl 0 d_infl_1 --robust
# equation 12.13
ols d_infl 0 d_infl(-1 to -4) --robust
# F-test following 12.13
omit d_infl_2 d_infl_3 d_infl_4 --test-only
# equation 12.16
ols d_infl 0 d_infl(-1 to -4) LHUR_1 --robust
# equation 12.17
ols d_infl 0 d_infl(-1 to -4) LHUR(-1 to -4) --robust
# ADF regression, equation 12.34
series infl_1 = infl(-1)
ols d_infl 0 infl_1 d_infl(-1 to -4)
scalar adft = $coeff(infl_1) / $stderr(infl_1)
print adft
|