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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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