* * Example starting on page 79 * open data food.dat data(format=free,org=columns) 1 40 food income * linreg food # constant income * * The instruction PRJ computes fitted values. For a specific set of explanatory * variables, you use the option XVECT=||x1,...,xn||. Note that you include the 1 * for the CONSTANT, which in RATS is treated like any other explanatory variable. * * After PRJ, the fitted value is in %prjfit and the standard error of prediction * is in %prjstderr. * prj(xvect=||1.0,20.0||) * * DISPLAY (disp or dis for short) displays computed values, possibly with * descriptive strings. If you want to control the number of digits displayed, you * can use "pictures" before the values. For instance, if you want to show %prjfit * with four digits right of the decimal, you would add *.#### before the %PRJFIT * in the next instruction. * disp "Predicted Value at income=20" %prjfit * * The %invttest function gives two-tailed critical values, so to get the .95 * percentage confidence band, you go from - the .05 critical value to + the .05 * critical value. * disp "Confidence Interval" %prjfit-%invttest(.05,%ndf)*%prjstderr %prjfit+%invttest(.05,%ndf)*%prjstderr