Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The REG Procedure

Example 55.9: Displaying Confidence and Prediction Intervals

This example illustrates how you can use shorthand commands to plot the dependent variable, the predicted value, and the 95% confidence or prediction intervals against a regressor. The following statements use the PRED option to create a plot with prediction intervals; the CONF option works similarly. Results are displayed in Output 55.9.1. Note that the statistics displayed by default in the margin are suppressed while three other statistics are exhibited.

   legend1 position=(bottom left inside)
           across=1 cborder=red offset=(0,0)
           shape=symbol(3,1) label=none
           value=(height=.8);
   title 'Prediction Intervals';
   symbol1 c=yellow v=- h=1;
   symbol2 c=red;
   symbol3 c=blue;
   symbol4 c=blue;

   proc reg data=fitness;
      model Oxygen=RunTime / noprint;
      plot Oxygen*RunTime / pred nostat mse aic bic
           caxis=red ctext=blue cframe=ligr 
           legend=legend1 modellab='         ';
   run;

Output 55.9.1: Prediction Intervals
regx1e.gif (6196 bytes)

Plots can be produced with both confidence and prediction intervals using the following statement.

   plot Oxygen*RunTime / conf pred;

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.