Resources

Creating Lognormal Q-Q Plots

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: CAPQQ2                                              */
/*   TITLE: Creating Lognormal Q-Q Plots                        */
/* PRODUCT: QC                                                  */
/*  SYSTEM: ALL                                                 */
/*    KEYS: Capability Analysis, Quantile-Quantile Plots,       */
/*   PROCS: CAPABILITY                                          */
/*    DATA:                                                     */
/*                                                              */
/* SUPPORT: saswgr                                              */
/*     REF: SAS/QC Software:  Usage and Reference, Version 6,   */
/*          First Edition, Volume 1 and Volume 2                */
/*    MISC:                                                     */
/*                                                              */
/*  Examples in the documentation were created using the        */
/*    statement:  ods listing style=statistical;                */
/*                                                              */
/****************************************************************/

data Measures;
   input Diameter @@;
   label Diameter='Diameter in mm';
   datalines;
5.501  5.251  5.404  5.366  5.445  5.576  5.607
5.200  5.977  5.177  5.332  5.399  5.661  5.512
5.252  5.404  5.739  5.525  5.160  5.410  5.823
5.376  5.202  5.470  5.410  5.394  5.146  5.244
5.309  5.480  5.388  5.399  5.360  5.368  5.394
5.248  5.409  5.304  6.239  5.781  5.247  5.907
5.208  5.143  5.304  5.603  5.164  5.209  5.475
5.223
 ;

title 'Normal Q-Q Plot for Diameters';
proc capability data=Measures noprint;
   qqplot Diameter / normal square odstitle=title;
run;

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;

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;

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;