Help using Base SAS procedures

Proc severity/univariate

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

Proc severity/univariate

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
Solution
‎06-24-2016 12:05 PM
SAS Super FREQ
Posts: 3,752

Re: Proc severity/univariate

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;
 

View solution in original post


All Replies
Solution
‎06-24-2016 12:05 PM
SAS Super FREQ
Posts: 3,752

Re: Proc severity/univariate

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;
 
Occasional Contributor
Posts: 18

Re: Proc severity/univariate

Thank you for your help,

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 327 views
  • 2 likes
  • 2 in conversation