The UNIVARIATE Procedure |
PPPLOT Statement |
The PPPLOT statement creates a probability-probability plot (also referred to as a P-P plot or percent plot), which compares the empirical cumulative distribution function (ecdf) of a variable with a specified theoretical cumulative distribution function such as the normal. If the two distributions match, the points on the plot form a linear pattern that passes through the origin and has unit slope. Thus, you can use a P-P plot to determine how well a theoretical distribution models a set of measurements.
You can specify one of the following theoretical distributions with the PPPLOT statement:
beta
exponential
gamma
lognormal
normal
Weibull
Note:Probability-probability plots should not be confused with probability plots, which compare a set of ordered measurements with percentiles from a specified distribution. You can create probability plots with the PROBPLOT statement.
You can use any number of PPPLOT statements in the UNIVARIATE procedure. The components of the PPPLOT statement are as follows.
are the process variables for which P-P plots are created. If you specify a VAR statement, the variables must also be listed in the VAR statement. Otherwise, the variables can be any numeric variables in the input data set. If you do not specify a list of variables, then by default, the procedure creates a P-P plot for each variable listed in the VAR statement or for each numeric variable in the input data set if you do not specify a VAR statement. For example, if data set measures contains two numeric variables, length and width, the following two PPPLOT statements each produce a P-P plot for each of those variables:
proc univariate data=measures; var length width; ppplot; run; proc univariate data=measures; ppplot length width; run;
specify the theoretical distribution for the plot or add features to the plot. If you specify more than one variable, the options apply equally to each variable. Specify all options after the slash (/) in the PPPLOT statement. You can specify only one option that names a distribution, but you can specify any number of other options. By default, the procedure produces a P-P plot based on the normal distribution.
In the following example, the NORMAL, MU=, and SIGMA= options request a P-P plot based on the normal distribution with mean 10 and standard deviation 0.3. The SQUARE option displays the plot in a square frame, and the CTEXT= option specifies the text color.
proc univariate data=measures; ppplot length width / normal(mu=10 sigma=0.3) square ctext=blue; run;
Table 4.47 through Table 4.55 list the PPPLOT options by function. For complete descriptions, see the sections Dictionary of Options and Dictionary of Common Options. Options can be any of the following:
primary options
secondary options
general options
Table 4.47 summarizes the options for requesting a specific theoretical distribution.
Option |
Description |
---|---|
specifies beta P-P plot |
|
specifies exponential P-P plot |
|
specifies gamma P-P plot |
|
specifies lognormal P-P plot |
|
specifies normal P-P plot |
|
specifies Weibull P-P plot |
Table 4.48 through Table 4.54 summarize options that specify distribution parameters and control the display of the diagonal distribution reference line. Specify these options in parentheses after the distribution option. For example, the following statements use the NORMAL option to request a normal P-P plot:
proc univariate data=measures; ppplot length / normal(mu=10 sigma=0.3 color=red); run;
The MU= and SIGMA= normal-options specify and for the normal distribution, and the COLOR= normal-option specifies the color for the line.
Option |
Description |
---|---|
specifies color of distribution reference line |
|
specifies line type of distribution reference line |
|
suppresses the distribution reference line |
|
specifies width of distribution reference line |
Option |
Description |
---|---|
specifies shape parameter |
|
specifies shape parameter |
|
specifies scale parameter |
|
specifies lower threshold parameter |
Option |
Description |
---|---|
specifies scale parameter |
|
specifies threshold parameter |
Option |
Description |
---|---|
specifies shape parameter |
|
specifies change in successive estimates of at which the Newton-Raphson approximation of terminates |
|
specifies initial value for in the Newton-Raphson approximation of |
|
specifies maximum number of iterations in the Newton-Raphson approximation of |
|
specifies scale parameter |
|
specifies threshold parameter |
Option |
Description |
---|---|
specifies shape parameter |
|
specifies threshold parameter |
|
specifies scale parameter |
Option |
Description |
---|---|
specifies mean |
|
specifies standard deviation |
Option |
Description |
---|---|
specifies shape parameter |
|
specifies change in successive estimates of at which the Newton-Raphson approximation of terminates |
|
specifies initial value for in the Newton-Raphson approximation of |
|
specifies maximum number of iterations in the Newton-Raphson approximation of |
|
specifies scale parameter |
|
specifies threshold parameter |
Table 4.55 lists options that control the appearance of the plots. For complete descriptions, see the sections Dictionary of Options and Dictionary of Common Options.
Option |
Description |
---|---|
applies annotation requested in ANNOTATE= data set to key cell only |
|
provides an annotate data set |
|
specifies color for axis |
|
specifies color for frame |
|
specifies color for filling row label frames |
|
specifies color for filling column label frames |
|
specifies color for HREF= lines |
|
specifies table of contents entry for P-P plot grouping |
|
specifies color for proportion of frequency bar |
|
specifies color for text |
|
specifies color for row labels |
|
specifies color for column labels |
|
specifies color for VREF= lines |
|
specifies description for plot in graphics catalog |
|
specifies software font for text |
|
specifies AXIS statement for horizontal axis |
|
specifies height of text used outside framed areas |
|
specifies number of minor tick marks on horizontal axis |
|
specifies reference lines perpendicular to the horizontal axis |
|
specifies line labels for HREF= lines |
|
specifies position for HREF= line labels |
|
specifies software font for text inside framed areas |
|
specifies height of text inside framed areas |
|
specifies distance between tiles in comparative plot |
|
specifies line type for HREF= lines |
|
specifies line type for VREF= lines |
|
specifies name for plot in graphics catalog |
|
specifies number of columns in comparative plot |
|
suppresses frame around plotting area |
|
suppresses label for horizontal axis |
|
suppresses label for vertical axis |
|
suppresses tick marks and tick mark labels for vertical axis |
|
specifies number of rows in comparative plot |
|
overlays plots for different class levels (ODS Graphics only) |
|
displays P-P plot in square format |
|
turns and vertically strings out characters in labels for vertical axis |
|
specifies AXIS statement for vertical axis |
|
specifies label for vertical axis |
|
specifies number of minor tick marks on vertical axis |
|
specifies reference lines perpendicular to the vertical axis |
|
specifies line labels for VREF= lines |
|
specifies position for VREF= line labels |
|
specifies line thickness for axes and frame |
The following entries provide detailed descriptions of options for the PPPLOT statement. See the section Dictionary of Common Options for detailed descriptions of options common to all plot statements.
specifies the shape parameter for P-P plots requested with the BETA and GAMMA options. For examples, see the entries for the BETA and GAMMA options.
creates a beta P-P plot. To create the plot, the nonmissing observations are ordered from smallest to largest:
The -coordinate of the th point is the empirical cdf value . The -coordinate is the theoretical beta cdf value
where is the normalized incomplete beta function, , and
lower threshold parameter
scale parameter
first shape parameter
second shape parameter
You can specify , , , and with the ALPHA=, BETA=, SIGMA=, and THETA= beta-options, as illustrated in the following example:
proc univariate data=measures; ppplot width / beta(theta=1 sigma=2 alpha=3 beta=4); run;
If you do not specify values for these parameters, then by default, , , and maximum likelihood estimates are calculated for and .
IMPORTANT: If the default unit interval (0,1) does not adequately describe the range of your data, then you should specify THETA= and SIGMA= so that your data fall in the interval .
If the data are beta distributed with parameters , , , and , then the points on the plot for ALPHA=, BETA=, SIGMA=, and THETA= tend to fall on or near the diagonal line , which is displayed by default. Agreement between the diagonal line and the point pattern is evidence that the specified beta distribution is a good fit. You can specify the SCALE= option as an alias for the SIGMA= option and the THRESHOLD= option as an alias for the THETA= option.
specifies the shape parameter for P-P plots requested with the BETA distribution option. See the preceding entry for the BETA distribution option for an example.
specifies the shape parameter for P-P plots requested with the WEIBULL option. See the entry for the WEIBULL option for examples.
creates an exponential P-P plot. To create the plot, the nonmissing observations are ordered from smallest to largest:
The -coordinate of the th point is the empirical cdf value . The -coordinate is the theoretical exponential cdf value
where
threshold parameter
scale parameter
You can specify and with the SIGMA= and THETA= exponential-options, as illustrated in the following example:
proc univariate data=measures; ppplot width / exponential(theta=1 sigma=2); run;
If you do not specify values for these parameters, then by default, and a maximum likelihood estimate is calculated for .
IMPORTANT: Your data must be greater than or equal to the lower threshold . If the default is not an adequate lower bound for your data, specify with the THETA= option.
If the data are exponentially distributed with parameters and , the points on the plot for SIGMA= and THETA= tend to fall on or near the diagonal line , which is displayed by default. Agreement between the diagonal line and the point pattern is evidence that the specified exponential distribution is a good fit. You can specify the SCALE= option as an alias for the SIGMA= option and the THRESHOLD= option as an alias for the THETA= option.
creates a gamma P-P plot. To create the plot, the nonmissing observations are ordered from smallest to largest:
The -coordinate of the th point is the empirical cdf value . The -coordinate is the theoretical gamma cdf value
where is the normalized incomplete gamma function and
threshold parameter
scale parameter
shape parameter
You can specify , , and with the ALPHA=, SIGMA=, and THETA= gamma-options, as illustrated in the following example:
proc univariate data=measures; ppplot width / gamma(alpha=1 sigma=2 theta=3); run;
If you do not specify values for these parameters, then by default, and maximum likelihood estimates are calculated for and .
IMPORTANT: Your data must be greater than or equal to the lower threshold . If the default is not an adequate lower bound for your data, specify with the THETA= option.
If the data are gamma distributed with parameters , , and , the points on the plot for ALPHA=, SIGMA=, and THETA= tend to fall on or near the diagonal line , which is displayed by default. Agreement between the diagonal line and the point pattern is evidence that the specified gamma distribution is a good fit. You can specify the SHAPE= option as an alias for the ALPHA= option, the SCALE= option as an alias for the SIGMA= option, and the THRESHOLD= option as an alias for the THETA= option.
creates a lognormal P-P plot. To create the plot, the nonmissing observations are ordered from smallest to largest:
The -coordinate of the th point is the empirical cdf value . The -coordinate is the theoretical lognormal cdf value
where is the cumulative standard normal distribution function and
threshold parameter
scale parameter
shape parameter
You can specify , , and with the THETA=, ZETA=, and SIGMA= lognormal-options, as illustrated in the following example:
proc univariate data=measures; ppplot width / lognormal(theta=1 zeta=2); run;
If you do not specify values for these parameters, then by default, and maximum likelihood estimates are calculated for and .
IMPORTANT: Your data must be greater than the lower threshold . If the default is not an adequate lower bound for your data, specify with the THETA= option.
If the data are lognormally distributed with parameters , , and , the points on the plot for SIGMA=, THETA=, and ZETA= tend to fall on or near the diagonal line , which is displayed by default. Agreement between the diagonal line and the point pattern is evidence that the specified lognormal distribution is a good fit. You can specify the SHAPE= option as an alias for the SIGMA=option, the SCALE= option as an alias for the ZETA= option, and the THRESHOLD= option as an alias for the THETA= option.
specifies the mean for a normal P-P plot requested with the NORMAL option. By default, the sample mean is used for . See Example 4.36.
creates a normal P-P plot. By default, if you do not specify a distribution option, the procedure displays a normal P-P plot. To create the plot, the nonmissing observations are ordered from smallest to largest:
The -coordinate of the th point is the empirical cdf value . The -coordinate is the theoretical normal cdf value
where is the cumulative standard normal distribution function and
location parameter or mean
scale parameter or standard deviation
You can specify and with the MU= and SIGMA= normal-options, as illustrated in the following example:
proc univariate data=measures; ppplot width / normal(mu=1 sigma=2); run;
By default, the sample mean and sample standard deviation are used for and .
If the data are normally distributed with parameters and , the points on the plot for MU= and SIGMA= tend to fall on or near the diagonal line , which is displayed by default. Agreement between the diagonal line and the point pattern is evidence that the specified normal distribution is a good fit. See Example 4.36.
specifies the parameter , where . When used with the BETA, EXPONENTIAL, GAMMA, NORMAL, and WEIBULL options, the SIGMA= option specifies the scale parameter. When used with the LOGNORMAL option, the SIGMA= option specifies the shape parameter. See Example 4.36.
displays the P-P plot in a square frame. The default is a rectangular frame. See Example 4.36.
specifies the lower threshold parameter for plots requested with the BETA, EXPONENTIAL, GAMMA, LOGNORMAL, and WEIBULL options.
creates a Weibull P-P plot. To create the plot, the nonmissing observations are ordered from smallest to largest:
The -coordinate of the th point is the empirical cdf value . The -coordinate is the theoretical Weibull cdf value
where
threshold parameter
scale parameter
shape parameter
You can specify , , and with the C=, SIGMA=, and THETA= Weibull-options, as illustrated in the following example:
proc univariate data=measures; ppplot width / weibull(theta=1 sigma=2); run;
If you do not specify values for these parameters, then by default and maximum likelihood estimates are calculated for and .
IMPORTANT: Your data must be greater than or equal to the lower threshold . If the default is not an adequate lower bound for your data, you should specify with the THETA= option.
If the data are Weibull distributed with parameters , , and , the points on the plot for C=, SIGMA=, and THETA= tend to fall on or near the diagonal line , which is displayed by default. Agreement between the diagonal line and the point pattern is evidence that the specified Weibull distribution is a good fit. You can specify the SHAPE= option as an alias for the C= option, the SCALE= option as an alias for the SIGMA= option, and the THRESHOLD= option as an alias for the THETA= option.
specifies a value for the scale parameter for lognormal P-P plots requested with the LOGNORMAL option.
Copyright © SAS Institute, Inc. All Rights Reserved.