/usr/share/gretl/scripts/ps5-2.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 | # PS5.2, for Example 5.2 and Table 5.2
open data3-7
ols cost 0 age
# compute absolute percentage error
genr ape1 = 100*abs($uhat)/cost
# compute mean percentage error
genr mape1 = mean(ape1)
# Model B
ols cost 0 miles
genr ape2 = 100*abs($uhat)/cost
genr mape2 = mean(ape2)
# Model C
ols cost 0 age miles
genr ape3 = 100*abs($uhat)/cost
genr mape3 = mean(ape3)
# Correlation coefficients
corr age miles
print mape1 mape2 mape3
|