Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
QQPLOT Statement

Adding a Distribution Reference Line

See CAPQQ1 in the SAS/QC Sample Library

In a normal Q-Q plot, the normal distribution with mean \mu_0 and standard deviation \sigma_0 is represented by a reference line with intercept \mu_0 and slope \sigma_0.The following statements reproduce the Q-Q plot in Figure 10.1, adding the line for which \mu_0 and \sigma_0are estimated by the sample mean and standard deviation:

   title 'Normal Quantile-Quantile Plot for Hole Distance'; 
   legend1 frame cframe=ligr cborder=black position=center;
   proc capability data=sheets noprint;
         spec  lsl=9.5   llsl=2   clsl=blue
               usl=10.5  lusl=20  cusl=blue;
      qqplot distance / normal(mu=est sigma=est color=yellow l=2 w=2)
                        square
                        nospeclegend
                        cframe = ligr
                        legend = legend1;
   run;

The plot is displayed in Figure 10.3.

capqgs3.gif (4680 bytes)

Figure 10.3: Adding a Distribution Reference Line to a Q-Q Plot

Specifying MU=EST and SIGMA=EST with the NORMAL option requests the reference line (alternatively, you can specify numeric values for \mu_0 and \sigma_0 with the MU= and SIGMA= options). The COLOR= and L= options specify the color of the line and the line type. The SQUARE option displays the plot in a square format, and the NOSPECLEGEND option suppresses the legend for the specification lines. The LLSL=, LUSL=, CLSL=, and CUSL= options in the SPEC statement specify line types and colors for the specification limits.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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