/usr/share/gretl/scripts/ps8-1.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 | # PS8.1, for Examples 8.1 and 8.2
open data3-11
genr LNSALARY=ln(SALARY)
# Figure 8.2 and Example 8.1
textplot LNSALARY YEARS
genr YRS2 = YEARS*YEARS
# estimate basic log quadratic model for Example 8.2
ols LNSALARY const YEARS YRS2
# save uhat squared and predicted LNSALARY
genr usq=$uhat*$uhat
# genr predicted LNSALARY as actual minus residual stored as uhat
genr yhat1=LNSALARY-$uhat
# graph estimated residual variance against YEARS and yhat
textplot usq YEARS
textplot usq yhat1
|