/usr/share/gretl/scripts/misc/sw_ch14.inp is in gretl-common 1.9.6-1build1.
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 | # Reproduce the illustrative VAR and GARCH in Stock and Watson,
# "Introduction to Econometrics", chapter 14
open sw_ch14.gdt
# set the robust std errors variant used by S and W
set force_hc on
set hc_version 1
genr infl = 400 * log(PUNEW/PUNEW(-1))
diff infl
lags d_infl LHUR
smpl 1962:1 1999:4
# run "automatic" VAR, (see equations 14.5 and 14.6)
var 4 d_infl LHUR const -r
# for comparison, try one equation manually
ols LHUR const d_infl(-1 to -4) LHUR(-1 to -4) -r
# Test for Granger causality of unemployment by inflation
omit d_infl(-1 to -4) --test-only
# GARCH model
garch 1 1 ; d_infl const d_infl(-1 to -4) LHUR(-1 to -4) -r --vcv
|