/***************************************************************************************************************** SAS file name: Weibull_Example.sas File location: _________________________________________________________________________________________________________________ Purpose: Describe the Weill distribution and draw Probability Density function and Cumulative Density Function for different values of the parameters. Author: Peter Clemmensen Creation Date: 05/01/2017 This program supports the Weibull examples on SASnrd.com *****************************************************************************************************************/ data Weibull; do k = 1 to 3; do x = 0 to 25 by 0.1; Weibull_PDF = pdf('Weibull', x, k, 5); output; end; end; run; title 'Weibull Density'; title2 'For different values of k. (*ESC*){unicode lambda} = 5'; proc sgplot data=Weibull noautolegend; series x=x y=Weibull_PDF / group=k lineattrs = (thickness=2); keylegend / position=NE location=inside across=1 noborder valueattrs=(Size=12 Weight=Bold) title='k =' titleattrs = (Size=12 Weight=Bold); xaxis label='x' labelattrs = (size=12 weight=Bold); yaxis display=(nolabel) label='PDF' labelattrs = (size=12 weight=Bold); run; title; data Weibull; do lambda = 3 to 7 by 2; do x = 0 to 25 by 0.1; Weibull_PDF = pdf('Weibull', x, 2, lambda); output; end; end; run; title 'Weibull Density'; title2 'For different values of (*ESC*){unicode lambda}. k = 2'; proc sgplot data = Weibull; series x=x y=Weibull_PDF / group=lambda lineattrs = (thickness=2); yaxis display=(nolabel); keylegend / position=NE location=inside across=1 noborder valueattrs=(Size=12 Weight=Bold) title='(*ESC*){unicode lambda} =' titleattrs = (Size=12 Weight=Bold); xaxis label='x' labelattrs = (size=12 weight=Bold); yaxis display=(nolabel) labelattrs = (size=12 weight=Bold); run; title;