Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
QQPLOT Statement

Example 10.2: Estimating Parameters from Lognormal Plots

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

Three-Parameter Lognormal Plots

See CAPQQ2 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 \sigmafrom 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 10.2.1 through Output 10.2.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
                        cframe = ligr;
   run;

Output 10.2.1: Lognormal Quantile-Quantile Plot (\sigma =0.2)
capqex2a.gif (4159 bytes)

Output 10.2.2: Lognormal Quantile-Quantile Plot (\sigma =0.5)
capqex2b.gif (4240 bytes)

Output 10.2.3: Lognormal Quantile-Quantile Plot (\sigma =0.8)
capqex2c.gif (4143 bytes)

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 10.2.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)=\{
 \frac{\sqrt{2}}{\sqrt{\pi}(x-\theta)}
 \exp ( -2(\log(x-\theta)-\zeta)^2)
 & { for  x \gt \theta \space } \ 0 & { for  x \leq \theta \space }
 .
\)
The points in the plot fall on or near the line with intercept \theta and slope \exp(\zeta).Based on Output 10.2.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

See CAPQQ2 in the SAS/QC Sample Library

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

The point pattern in Output 10.2.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. The result is shown in Output 10.2.4.

   title 'Lognormal Q-Q Plot for Diameters';
   legend1 frame cframe=ligr cborder=black position=center;
   proc capability data=measures noprint;
      qqplot diameter / lognormal(sigma=0.5 theta=5 slope=0.39
                                  color=yellow)
                        pctlaxis(grid lgrid=35) 
                        vref  = 5.8 5.9 6.0
                        cvref = blue
                        cframe = ligr
                        legend=legend1;
   run;

Output 10.2.4: Lognormal Q-Q Plot Identifying Percentiles
capqex2d.gif (5381 bytes)

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

Alternatively, you can compute this percentile from the estimated lognormal parameters. The 100\alpha\!^{{\scriptsize 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  ( \frac{1}2\Phi^{-1}(0.95) + \log(0.39)  ) + 5
 \approx \exp  ( \frac{1}2 x 1.645 - 0.94  ) + 5
 \approx 5.89

Two-Parameter Lognormal Plots

See CAPQQ2 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;
      label logdiam = 'log(Diameter-5)';
      logdiam = log( diameter - 5 );
   title 'Two-Parameter Lognormal Q-Q Plot for Diameters';
   legend1 frame cframe=ligr cborder=black position=center;
   proc capability data=measures noprint;
      qqplot logdiam / normal(mu=est sigma=est color=yellow)
                       vaxis=axis1
                       square 
                       cframe=ligr
                       legend=legend1;
      axis1 label=(a=90 r=0);
   run;

Output 10.2.5: Two-Parameter Lognormal Q-Q Plot for Diameters
capqex2e.gif (4127 bytes)

Because the point pattern in Output 10.2.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.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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