A refinement on the regression plot which shows the fitted regression line (see predicted
vs. explanatory variable in Figure 8.1) can be produced by using PROC GPLOT. This
produces a least squares fitted line and prints this on the plot. This output would be
suitable for inclusion in a report or research paper. SAS code to produce the fitted
regression line as well as plots of the 95 per cent confidence intervals for a mean
response and a 95 per cent prediction interval (individual response), is shown in Figure
14, Appendix A3. The output for these three plots is shown in Figures 8.7a–c. The 95 per
cent confidence interval for the mean standardized maths score for the mean teachers’
score is narrower than the comparable 95 per cent confidence interval for individual
observations (compare Figures 8.7b and 8.7c).
Figure 8.7a: Fitted least squares
regression line for prediction of
standardized maths ability score from
teacher estimate of maths ability
Statistical analysis for education and psychology researchers 276