|
The following DATA step statements simulate a sample from a lognormal distribution with population parameters $\mu = 1.5$ and $\sigma =0.25$, and store the sample in the variable Y of a data set Work.Test_sev1:
/*------------- Simple Lognormal Example -------------*/
data test_sev1(keep=y label='Simple Lognormal Sample');
call streaminit(45678);
label y='Response Variable';
Mu = 1.5;
Sigma = 0.25;
do n = 1 to 100;
y = exp(Mu) * rand('LOGNORMAL')**Sigma;
output;
end;
run;
The following statements fit all the predefined distribution models to the values of Y and identify the best distribution according to the corrected Akaike’s information criterion (AICC):
proc hpseverity data=test_sev1 crit=aicc;
loss y;
dist _predefined_;
run;
The PROC HPSEVERITY statement specifies the input data set along with the model selection criterion, the LOSS statement specifies the variable to be modeled, and the DIST statement with the _PREDEFINED_ keyword specifies that all the predefined distribution models be fitted.
|