Chapter Contents Previous 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 , a scale parameter , and a shape parameter .You can estimate from a series of lognormal Q-Q plots with different values of .The estimate is the value of 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 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 ( =0.2)

Output 10.2.2: Lognormal Quantile-Quantile Plot ( =0.5)

Output 10.2.3: Lognormal Quantile-Quantile Plot ( =0.8)

Note: You must specify a value for the shape parameter 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 provides a reasonable fit for the data distribution.

Data with this particular lognormal distribution have the density function



The points in the plot fall on or near the line with intercept and slope .Based on Output 10.2.2, and , giving .

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

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 percentile of the lognormal distribution is

where is the inverse cumulative standard normal distribution. Consequently,

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

Because the point pattern in Output 10.2.5 is linear, you can estimate the lognormal parameters and as the normal plot estimates of and ,which are -0.99 and 0.51. These values correspond to the previous estimates of -0.92 for and 0.5 for .

 Chapter Contents Previous Next Top