/usr/share/gretl/scripts/ps6-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 19 20 21 | # PS6.2 for Example 6.2
open data6-1
square OUTPUT INPCOST
# estimate models
ols UNITCOST 0 OUTPUT sq_OUTPUT INPCOST sq_INPCOST
omit sq_INPCOST
# retrieve regression coefficients
genr b1 = $coeff(0)
genr b2 = $coeff(OUTPUT)
genr b3 = $coeff(sq_OUTPUT)
genr b4 = $coeff(INPCOST)
# generate estimated averages to graph the average cost function
genr time
genr x = 40 + (time*5)
genr INPCOST1 = 80
genr INPCOST2 = 115
genr INPCOST3 = 150
genr yhat1 = b1+(b2*x) + (b3*x*x) + (b4*INPCOST1)
genr yhat2 = b1+(b2*x) + (b3*x*x) + (b4*INPCOST2)
genr yhat3 = b1+(b2*x) + (b3*x*x) + (b4*INPCOST3)
print -o x yhat1 yhat2 yhat3
|