* Prediction * Reference: Chapters 3 and 5 of * R. Carter Hill, William E. Griffiths and George G. Judge, * Undergraduate Econometrics, Second Edition, Wiley. * * Use the DIM command to allocate space for the variables DIM FOOD 41 INCOME 41 YHAT 41 SE 41 * Set a value for income for the prediction exercise SAMPLE 41 41 GENR INCOME=750 * Load the data set SAMPLE 1 40 READ (TAB3-1.shd) FOOD INCOME / SKIPLINES=1 * Least squares estimation OLS FOOD INCOME * Prediction (Equation 3.3.15, p.57 and Section 5.3.1, p.113) FC / LIST BEG=41 END=41 PREDICT=YHAT FCSE=SE * Note: the calculated residual and prediction diagnostics from * FC are not meaningful since there is no observed value for FOOD. * Calculate a 95% prediction interval (Section 5.3.1, p.113). * Obtain the critical value. GEN1 DF=$N-$K SAMPLE 1 1 GEN1 ALPHA=0.05/2 DISTRIB ALPHA / TYPE=T DF=DF INVERSE CRITICAL=TC PRINT TC SAMPLE 41 41 GENR YUP=YHAT+TC*SE GENR YLOW=YHAT-TC*SE * Print the prediction interval PRINT YLOW YUP STOP