/usr/share/gretl/scripts/ps11-2.inp is in gretl-common 2017d-3build1.
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 | # PS11.2 for evaluating Model B - Table 11.2
open data10-5.gdt
genr time
# create square of time
genr tsq = time*time
smpl 1960 1989
# quadratic Model B
ar1 calwage 0 time tsq
# obtain one-step ahead forecasts
fcast 1960 1994 yhatb --static
# reset sample range and regress actual against predicted calwage
smpl 1990 1994
ols calwage 0 yhatb
# compute absolute percentage error
smpl 1961 1994
genr yf = int(100*yhatb+0.5)/100
genr ape = int(100*((100*abs(calwage-yhatb)/calwage)+0.5))/100
print calwage yf ape --byobs
|