"Fossies" - the Fresh Open Source Software Archive

Member "gretl/scripts/ramanathan/ps6-12.inp" (2 Oct 2015, 677 Bytes) of package /windows/misc/gretl-2020e-win32.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Charmm source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # PS6.12 for Ramsey's RESET test - Example 6.9 
    2 open data6-1
    3 ols UNITCOST const OUTPUT INPCOST 
    4 # generate estimated Y and its powers
    5 genr yhat1 = UNITCOST-$uhat
    6 genr yhat2 = yhat1*yhat1
    7 genr yhat3 = yhat1*yhat2
    8 genr yhat4 = yhat2*yhat2
    9 list
   10 # estimated model with new variables
   11 ols UNITCOST const OUTPUT INPCOST yhat2 yhat3 yhat4  
   12 omit yhat2 yhat3 yhat4  
   13 # Repeat example with the square of OUTPUT added to the model
   14 square OUTPUT 
   15 ols UNITCOST const OUTPUT INPCOST sq_OUTPUT 
   16 genr yhat5 = UNITCOST-$uhat
   17 genr yhat6 = yhat5*yhat5
   18 genr yhat7 = yhat5*yhat6
   19 genr yhat8 = yhat6*yhat6
   20 list
   21 ols UNITCOST const OUTPUT INPCOST sq_OUTPUT yhat6 yhat7 yhat8  
   22 omit yhat6 yhat7 yhat8