Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The REG Procedure

Example 55.8: Creating PP and QQ Plots

The following program creates probability-probability plots and quantile-quantile plots of the residuals (Output 55.8.1 and Output 55.8.2, respectively). An annotation data set is created to produce the (0,0)-(1,1) reference line for the PP-plot. Note that the NOSTAT option for the PP-plot suppresses the statistics that would be displayed in the margin.

   data annote1;
      length function color $8;
      retain ysys xsys '2' color 'black';
      function='move';
         x=0;
         y=0;
         output;
      function='draw';
         x=1;
         y=1;
         output;
   run;

   symbol1 c=blue;
   proc reg data=fitness;
      title 'PP Plot';
      model Oxygen=RunTime / noprint;
      plot npp.*r.
           / annotate=annote1 nostat cframe=ligr
             modellab="'Best' Two-Parameter Model:";
   run;
      title 'QQ Plot';
      plot r.*nqq.
           / noline mse cframe=ligr
             modellab="'Best' Two-Parameter Model:";
   run;

Output 55.8.1: Normal Probability-Probability Plot for the Residuals
regx1c.gif (4647 bytes)

Output 55.8.2: Normal Quantile-Quantile Plot for the Residuals
regx1d.gif (4165 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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