** Chapter 5.6 ** for W.H. Greene, Econometric Analysis 6th ed. ***************** * (c) Noel Roy 2003, 2008 * * PREDICTION * * The tutorial for this chapter will review the following tasks in SHAZAM: * • Forecasting/Prediction (FC command) * *=============================================================================== * * Example 6.4 Prediction for Investment * * Prediction can be performed using the FC command. This command * must be issued immediately after the estimation command on which * the prediction is based. * * First DIMension the variables that will be used to make the * prediction. * DIM i 205 deltap 205 realgdp 205 realinvs 205 TIME 1950.1 4 SAMPLE 1950.1 2000.4 READ (TableF5-1.prn)Year qtr realgdp realcons realinvs realgovt realdpi cpi M1 i unemp pop deltap realint / SKIPLINES=1 * * Read in the predicted values * READ realinvs i deltap realgdp /BEG=2001.1 END=2001.1 1721 4.48 5.26 9316.8 SAMPLE 1950.1 2001.1 GENR lnI=LOG(realinvs) GENR lnY=LOG(realgdp) GENR T=TIME(-1) * * Reestimate the equation, and make a prediction for 2001.1 * Save the predicted values in lnIhat and the standard error * of the predictions in SE. DIM SE 205 lnIhat 205 SAMPLE 1950.2 2000.4 ?OLS lnI i deltap lny t FC / BEG=2001.1 END=2001.1 predict=lnIhat FCSE=SE LIST * * The output of the FC command contains not only the predictions, * but also measures of forecast errors as discussed in Section 6.6 * of the textbook. * * Print the prediction interval for 2001.1. * SAMPLE 2001.1 2001.1 GENR lnIhatL=lnIhat-1.96*SE GENR lnIhatU=lnIhat+1.96*SE PRINT lnIhatL lnIhat lnIhatU * * Print the "exponentially corrected" estimate for real investment. * The variance extimate s2 is still available as $SIG2. * GENR Ihat=EXP(lnIhat)*EXP($SIG2/2) GENR Error=Ihat-1721 PRINT Ihat Error STOP * *=============================================================================== * * Updated August 28, 2008