/usr/share/gretl/scripts/ps10-9.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 27 28 29 30 | # PS10.9, for Example 10.7
open data10-5
genr time
# For testing for random walk, first generate lagged variables
lags uswage calwage
# next generate differences and their lags
genr duswage = diff(uswage)
genr dcalwage = diff(calwage)
lags duswage dcalwage
# lag of duswage is not defined for 1960 and 1961, start with 1962
smpl 1962 1994
# carry out F-tests for random walks
ols duswage 0 time uswage_1 duswage_1
omit time uswage_1
ols dcalwage 0 time calwage_1 dcalwage_1
omit time calwage_1
# For cointegrating regression, reset sample range to the beginning
smpl 1960 1994
ols calwage 0 uswage
# save residuals, generate their lags, and differences in lags
genr ut = $uhat
genr ut1 = ut(-1)
genr diffut = diff(ut)
lags 4 ; diffut
# suppress the first five observations
smpl 1965 1994
ols diffut ut1 diffut_1 diffut_2 diffut_3 diffut_4
# compare shortcut command
smpl 1960 1994
coint 4 calwage uswage
|