- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I used Proc univariate and since may, we decide to use Proc severity to fit data to weibull, pareto, Exp, Ln, Gamma severity.
data Grave(keep=Var1 label='Simple Lognormal Sample');
call streaminit(45678);
label Var1='Response Variable';
Mu = 15;
Sigma = 0.5;
do n = 1 to 20;
Var1= exp(Mu) * rand('LOGNORMAL')**Sigma;
output;
end;
run;
When i use a treshold of 0, i get the same parameter from Proc Severity and Proc Univariate for weibull, pareto, Exp, Ln, Gamma :
proc severity data=Grave crit=aicc;
loss VAR1 /*lt=150000*/;
dist _predefined_;
run;
proc univariate data=Grave;
var VAR1;
histogram / midpoints=150000 to 1050000 by 100000
Exponential/*(theta=150000)*/ gamma/*(theta=150000)*/ lognormal/*(theta=150000)*/ weibull/*(theta=150000)*/ pareto/*(theta=150000)*/;
/* vaxis = axis1
name = 'MyHist';
inset n mean((theta=150000)) /*std='Std Dev'(5.3) skewness(5.3)
/ pos = ne header = 'Summary Statistics';
axis1 label=(a=90 r=0);*/
run;
When i use Treshold of 150000, my parameters are not equal.
I want to get the same parameters from proc univariate and proc severity.
How i can do that?
Regards,
Thanks in advance,
Azeddine,
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
PROC UNIVARIATE supports many families that have threshold parameters. Other SAS procedures do not. Instead, they assume a standardize distribution that has a threashold of 0.
You can get the same parameter estimates by subtracting the desired threshold value from the data that you want to analyze. For example, the following data view subtracts 150,000 from the VAR1 variable. The PROC SEVERITY estimates for the exponential distribution are the same as for the PROC UNIVARIATE estiamtes:
%let Threshold = 150000;
proc univariate data=Grave;
var VAR1;
histogram / Exponential(theta=&Threshold);
run;
/* create data VIEW that subtracts threshold value */
data A / view=A;
set Grave;
Var1 = Var1 - &Threshold;
run;
proc severity data=A crit=aicc; /* call proc on view */
loss VAR1;
dist exp;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
PROC UNIVARIATE supports many families that have threshold parameters. Other SAS procedures do not. Instead, they assume a standardize distribution that has a threashold of 0.
You can get the same parameter estimates by subtracting the desired threshold value from the data that you want to analyze. For example, the following data view subtracts 150,000 from the VAR1 variable. The PROC SEVERITY estimates for the exponential distribution are the same as for the PROC UNIVARIATE estiamtes:
%let Threshold = 150000;
proc univariate data=Grave;
var VAR1;
histogram / Exponential(theta=&Threshold);
run;
/* create data VIEW that subtracts threshold value */
data A / view=A;
set Grave;
Var1 = Var1 - &Threshold;
run;
proc severity data=A crit=aicc; /* call proc on view */
loss VAR1;
dist exp;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your help,