QQPLOT Statement: CAPABILITY Procedure

Example 5.22 Estimating Parameters from Lognormal Plots

This example, which is a continuation of Example 5.21, demonstrates techniques for estimating the shape parameter, location and scale parameters, and theoretical percentiles for a lognormal distribution.

Three-Parameter Lognormal Plots

Note: See Creating Lognormal Q-Q Plots in the SAS/QC Sample Library.

The three-parameter lognormal distribution depends on a threshold parameter $\theta $, a scale parameter $\zeta $, and a shape parameter $\sigma $. You can estimate $\sigma $ from a series of lognormal Q-Q plots with different values of $\sigma $. The estimate is the value of $\sigma $ that linearizes the point pattern. You can then estimate the threshold and scale parameters from the intercept and slope of the point pattern. The following statements create the series of plots in Output 5.22.1 through Output 5.22.3 for $\sigma $ values of 0.2, 0.5, and 0.8:

title 'Lognormal Q-Q Plot for Diameters';
proc capability data=Measures noprint;
   qqplot Diameter / lognormal(sigma=0.2 0.5 0.8)
                     square
                     odstitle=title;
run;

Output 5.22.1: Lognormal Quantile-Quantile Plot ($\sigma $ =0.2)


Output 5.22.2: Lognormal Quantile-Quantile Plot ($\sigma $ =0.5)


Output 5.22.3: Lognormal Quantile-Quantile Plot ($\sigma $ =0.8)


Note: You must specify a value for the shape parameter $\sigma $ for a lognormal Q-Q plot with the SIGMA= option or its alias, the SHAPE= option.

The plot in Output 5.22.2 displays the most linear point pattern, indicating that the lognormal distribution with $\sigma =0.5$ provides a reasonable fit for the data distribution.

Data with this particular lognormal distribution have the density function

$ p(x)=\left\{  \begin{array}{ll} \frac{\sqrt {2}}{\sqrt {\pi }(x-\theta )} \exp \left( -2(\log (x-\theta )-\zeta )^{2}\right) &  \mbox{ for $ x > \theta $ } \\ 0 &  \mbox{ for $ x \leq \theta $ } \end{array} \right. $

The points in the plot fall on or near the line with intercept $\theta $ and slope $\exp (\zeta )$. Based on Output 5.22.2, $\theta \approx 5$ and $\exp (\zeta ) \approx \frac{1.2}{3} = 0.4$, giving $\zeta \approx \log (0.4) \approx -0.92$.

Estimating Percentiles

Note: See Creating Lognormal Q-Q Plots in the SAS/QC Sample Library.

You can use a Q-Q plot to estimate percentiles such as the 95th percentile of the lognormal distribution.[13]

The point pattern in Output 5.22.2 has a slope of approximately 0.39 and an intercept of 5. The following statements reproduce this plot, adding a lognormal reference line with this slope and intercept.

title 'Lognormal Q-Q Plot for Diameters';
proc capability data=Measures noprint;
   qqplot Diameter / lognormal(sigma=0.5 theta=5 slope=0.39)
                     pctlaxis(grid)
                     vref  = 5.8 5.9 6.0;
run;

The ODS GRAPHICS ON statement specified before the PROC CAPABILITY statement enables ODS Graphics, so the Q-Q plot is created using ODS Graphics instead of traditional graphics. The result is shown in Output 5.22.4.

Output 5.22.4: Lognormal Q-Q Plot Identifying Percentiles


The PCTLAXIS option labels the major percentiles, and the GRID option draws percentile axis reference lines. The 95th percentile is 5.9, because the intersection of the distribution reference line and the 95th reference line occurs at this value on the vertical axis.

Alternatively, you can compute this percentile from the estimated lognormal parameters. The $100\alpha $th percentile of the lognormal distribution is

\[  P_\alpha = \exp (\sigma \Phi ^{-1}(\alpha ) + \zeta ) + \theta  \]

where $\Phi ^{-1}(\cdot )$ is the inverse cumulative standard normal distribution. Consequently,

\[  P_{0.95} \approx \exp \left( \frac{1}{2}\Phi ^{-1}(0.95) + \log (0.39) \right) + 5 \approx \exp \left( \frac{1}{2} \times 1.645 - 0.94 \right) + 5 \approx 5.89  \]
Two-Parameter Lognormal Plots

Note: See Creating Lognormal Q-Q Plots in the SAS/QC Sample Library.

If a known threshold parameter is available, you can construct a two-parameter lognormal Q-Q plot by subtracting the threshold from the data and requesting a normal Q-Q plot. The following statements create this plot for Diameter, assuming a known threshold of five:

data Measures;
   set Measures;
   Logdiam=log(Diameter-5);
   label Logdiam='log(Diameter-5)';
run;
title 'Two-Parameter Lognormal Q-Q Plot for Diameters';
proc capability data=Measures noprint;
   qqplot Logdiam / normal(mu=est sigma=est)
                    square
                    odstitle=title;
run;

Output 5.22.5: Two-Parameter Lognormal Q-Q Plot for Diameters


Because the point pattern in Output 5.22.5 is linear, you can estimate the lognormal parameters $\zeta $ and $\sigma $ as the normal plot estimates of $\mu $ and $\sigma $, which are –0.99 and 0.51. These values correspond to the previous estimates of –0.92 for $\zeta $ and 0.5 for $\sigma $.



[13] You can also use a probability plot for this purpose. See Output 5.20.1.