BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Azeddine
Obsidian | Level 7

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,

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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

2 REPLIES 2
Rick_SAS
SAS Super FREQ

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;
 
Azeddine
Obsidian | Level 7

Thank you for your help,

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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