/usr/share/gretl/scripts/ps10-3.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 | # PS10.3, for the Breusch-Godfrey LM test for Example 10.4
open data10-2
genr load1 = load(-1)
# Suppress the first observation
smpl 1.02 31.24
# Estimate transformed model
ols load 0 load1 temp
# save residuals
genr ut=$uhat
# Generate lag values for ut
genr ut1=ut(-1)
genr ut2=ut(-2)
genr ut3=ut(-3)
genr ut4=ut(-4)
genr ut5=ut(-5)
genr ut6=ut(-6)
# Suppress the first seven observations
smpl 1.08 31.24
# Estimate the auxiliary regression
ols ut 0 ut1 ut2 ut3 ut4 ut5 ut6 load1 temp
# compute TR-square statistic and its p-value
genr LM=$trsq
pvalue X 6 LM
|