/usr/share/gretl/scripts/ps10-1.inp is in gretl-common 1.9.14-2.
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 | # PS10.1 for Example 10.1
open data10-1
help lags
# Generate four lagged variables for M and D
lags M D
# Reset sample range and suppress first four observations
smpl 1965.1 ;
# Estimate kitchen sink model by OLS
ols r const M D M_1 M_2 M_3 M_4 D_1 D_2 D_3 D_4
# Perform LM test for AR(4)
genr ut=$uhat
lags ut
smpl 1966.1 ;
# Auxiliary regression for LM test
ols ut const ut_1 ut_2 ut_3 ut_4 M D M_1 M_2 M_3 M_4 D_1 D_2 D_3 D_4
genr LM=$trsq
# p-value indicates significant fourth-order autocorrelation
pvalue X 4 LM
# Reset sample range back and estimate AR(4) by Generalized CORC
smpl 1965.1 ;
ar 1 2 3 4 ; r const M D M_1 M_2 M_3 M_4 D_1 D_2 D_3 D_4
# omit all variables with p-values greater than 0.5
omit M_2 M_3 M_4 D_1 D_2 D_3
# omit variables one at a time
omit D_4
omit D
|