/***************************************************************************************************************** SAS file name: Exponential_Curves.sas File location: _________________________________________________________________________________________________________________ Purpose: Describe the Exponential distribution and draw Probability Density function and Cumulative Density Function for different values of the parameters. Author: Peter Clemmensen Creation Date: 01/06/2017 This program supports the Exponential Distribution examples on SASnrd.com *****************************************************************************************************************/ /* Exponential PDF Curves */ data Exponential_PDF; do sigma = .5, 1, 2; do x=0 to 4 by 0.01; Exponential_PDF = pdf('Exponential', x, sigma); output; end; end; run; title 'Exponential Density For different values of (*ESC*){unicode sigma}'; proc sgplot data=Exponential_PDF noautolegend; series x=x y=Exponential_PDF / group=sigma lineattrs = (thickness=2); keylegend / position=NE location=inside across=1 noborder valueattrs=(Size=12 Weight=Bold) title='(*ESC*){unicode sigma} =' 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; /* Exponential CDF Curves */ data Exponential_CDF; do sigma = .5, 1, 2; do x=0 to 4 by 0.01; Exponential_CDF = cdf('Exponential', x, sigma); output; end; end; run; title 'Exponential Density For different values of (*ESC*){unicode sigma}'; proc sgplot data=Exponential_CDF noautolegend; series x=x y=Exponential_CDF / group=sigma lineattrs = (thickness=2); keylegend / position=NW location=inside across=1 noborder valueattrs=(Size=12 Weight=Bold) title='(*ESC*){unicode sigma} =' 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;