Small Log to Check the Formula for Prediction Interval (as given on the handout RegrSheet.pdf) against the Calculated Prediction Intervals in SAS. ====================================================== I begin by using the small simulated dataset already saved as SimSet0.sas7bdat. I am adding two artificial records, one with X value 1.5 and the other the same X as obs 10, with Y missing for both. libname home "."; options nocenter linesize=70; data Simtmp; set home.simset0; if _N_ = 1 then do; x = 1.5; y = .; output; end; if _N_ = 10 then do; y = .; output; end; * Generated two records ; proc print; run; Obs X y 1 1.50000 . 2 0.31486 . data SimSet0; set home.simset0 Simtmp; proc reg data=simset0; model y = x; output out=PredTmp p = predmn stdi = IndSE stdr = rsdSE L95 = lowpred U95 = hipred; * Mean-square error sigma^2 hat = 0.79844 with 73 degrees of freedom, and (also from proc reg) ahat = 0.64567 , bhat = 2.01129 proc print data=PredTmp (firstobs=70); run; Obs X y predmn lowpred hipred rsdSE IndSE 70 0.09704 0.56500 0.84085 -0.97620 2.65789 0.87502 0.91171 71 0.05941 1.48832 0.76517 -1.05641 2.58674 0.87264 0.91399 72 0.97048 2.86848 2.59759 0.77650 4.41869 0.87289 0.91375 73 0.42874 1.55990 1.50800 -0.28577 3.30176 0.88703 0.90003 74 0.43740 -0.65496 1.52541 -0.26815 3.31897 0.88713 0.89993 75 0.06559 0.62970 0.77759 -1.04321 2.59840 0.87305 0.91360 76 1.50000 . 3.66260 1.74011 5.58510 . 0.96463 77 0.31486 . 1.27893 -0.51942 3.07729 . 0.90234 NOTE that the IndSE (standard errors used in calculating the prediction intervals) are a little bit higher than the rsdSE standard errors used in calculating standardized residuals. To see just how much, note from the formulas given in RegrSheet.pdf that rsdSE^2 and IndSE^2 should lie equidistant from Sighat^2 We check this in a little data-step: data checkSE; set PredTmp (keep = rsdSE IndSE); AvgVar = (rsdSE**2 + IndSE**2)/2; proc print data=checkSE (firstobs=70); run; ### The avgSE is constant .79844 to 5th decimal place which DOES agree with sigma^2 above. ================================================= Further features & options: proc reg data=simset0; model y = x/ alpha=.01; output out=PredTmp2 p = predmn stdi = IndSE stdr = rsdSE lcl = lowpred ucl = hipred; run; Obs X y predmn lowpred hipred rsdSE IndSE 70 0.09704 0.56500 0.84085 -1.57052 3.25222 0.87502 0.91171 71 0.05941 1.48832 0.76517 -1.65221 3.18254 0.87264 0.91399 72 0.97048 2.86848 2.59759 0.18085 5.01433 0.87289 0.91375 73 0.42874 1.55990 1.50800 -0.87247 3.88847 0.88703 0.90003 74 0.43740 -0.65496 1.52541 -0.85479 3.90561 0.88713 0.89993 75 0.06559 0.62970 0.77759 -1.63876 3.19395 0.87305 0.91360 76 1.50000 . 3.66260 1.11130 6.21391 . 0.96463 77 0.31486 . 1.27893 -1.10763 3.66549 . 0.90234 YOU CAN SEE THAT THE alpha=.01 OPTION HERE HAD THE EFFECT OF WIDENING THE PREDICTION INTERVAL AND ENLARGING THE SE'S; NOTE THAT YOU NEEDED TO SPECIFY THE PREDICTION LIMITS WITH UCL AND LCL in order to use the option of customizing ALPHA.