QQPLOT <variables> < / options>;
The QQPLOT statement creates quantile-quantile plots (Q-Q plots) and compares ordered variable values with quantiles of a specified theoretical distribution. If the data distribution matches the theoretical distribution, the points on the plot form a linear pattern. Thus, you can use a Q-Q plot to determine how well a theoretical distribution models a set of measurements.
Q-Q plots are similar to probability plots, which you can create with the PROBPLOT statement. Q-Q plots are preferable for graphical estimation of distribution parameters, whereas probability plots are preferable for graphical estimation of percentiles.
You can use any number of QQPLOT statements in the UNIVARIATE procedure. The components of the QQPLOT statement are as follows.
Table 4.22 lists primary options for requesting a theoretical distribution. See the section Distributions for Probability and Q-Q Plots for detailed descriptions of these distributions.
Table 4.22: Primary Options for Theoretical Distributions
Table 4.23 lists secondary options that specify distribution parameters and control the display of a distribution reference line. Specify these options in parentheses after the distribution keyword. For example, you can request a normal Q-Q plot with a distribution reference line by specifying the NORMAL option as follows:
proc univariate; qqplot Length / normal(mu=10 sigma=0.3 color=red); run;
The MU= and SIGMA= normal-options display a distribution reference line that corresponds to the normal distribution with mean and standard deviation , and the COLOR= normal-option specifies the color for the line.
Table 4.23: Secondary Distribution Reference Line Options
Table 4.24 summarizes general options for enhancing Q-Q plots.
Table 4.24: General Graphics Options
Option |
Description |
---|---|
General Graphics Options |
|
creates a grid |
|
specifies reference lines perpendicular to the horizontal axis |
|
specifies labels for HREF= lines |
|
specifies vertical position of labels for HREF= lines |
|
suppresses label for horizontal axis |
|
suppresses label for vertical axis |
|
suppresses tick marks and tick mark labels for vertical axis |
|
displays a nonlinear percentile axis |
|
replaces theoretical quantiles with percentiles |
|
switches horizontal and vertical axes |
|
displays plot in square format |
|
specifies label for vertical axis |
|
specifies reference lines perpendicular to the vertical axis |
|
specifies labels for VREF= lines |
|
specifies horizontal position of labels for VREF= lines |
|
Options for Traditional Graphics Output |
|
specifies annotate data set |
|
specifies color for axis |
|
specifies color for frame |
|
specifies color for grid lines |
|
specifies colors for HREF= lines |
|
specifies colors for STATREF= lines |
|
specifies color for text |
|
specifies colors for VREF= lines |
|
specifies description for plot in graphics catalog |
|
specifies software font for text |
|
specifies height of text used outside framed areas |
|
specifies number of horizontal minor tick marks |
|
specifies software font for text inside framed areas |
|
specifies height of text inside framed areas |
|
specifies a line type for grid lines |
|
specifies line types for HREF= lines |
|
specifies line types for STATREF= lines |
|
specifies line types for VREF= lines |
|
specifies name for plot in graphics catalog |
|
suppresses frame around plotting area |
|
requests minor tick marks for percentile axis |
|
specifies AXIS statement for vertical axis |
|
specifies number of vertical minor tick marks |
|
specifies line thickness for axes and frame |
|
specifies line thickness for grid |
|
Options for ODS Graphics Output |
|
suppresses legend for distribution reference line |
|
specifies footnote displayed on plot |
|
specifies secondary footnote displayed on plot |
|
specifies title displayed on plot |
|
specifies secondary title displayed on plot |
|
overlays plots for different class levels (ODS Graphics only) |
|
Options for Comparative Plots |
|
applies annotation requested in ANNOTATE= data set to key cell only |
|
specifies color for filling frame for row labels |
|
specifies color for filling frame for column labels |
|
specifies color for proportion of frequency bar |
|
specifies distance between tiles |
|
specifies number of columns in comparative Q-Q plot |
|
specifies number of rows in comparative Q-Q plot |
|
Miscellaneous Options |
|
specifies table of contents entry for Q-Q plot grouping |
|
adjusts sample size when computing percentiles |
|
adjusts ranks when computing percentiles |
The following entries provide detailed descriptions of options in the QQPLOT statement. Options marked with † are applicable only when traditional graphics are produced. See the section Dictionary of Common Options for detailed descriptions of options common to all plot statements.