/usr/share/gretl/scripts/ps8-3.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 | # PS8.3, for Example 8.4, Goldfeld-Quandt test
open data8-1
genr LNSALARY=ln(SALARY)
genr YRS2 = YEARS*YEARS
# estimate log quadratic model for first 75 observations
smpl 1 75
ols LNSALARY const YEARS YRS2
genr var1 = $sigma*$sigma
genr df1 = $df
# estimate log quadratic model for last 75 observations
smpl 148 222
ols LNSALARY const YEARS YRS2
genr var2 = $sigma*$sigma
genr df2 = $df
# compute F-statistic and pvalue for test
smpl 1 222
genr Fc = var2/var1
pvalue F df1 df2 Fc
|