Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Programming
- /
- SAS Procedures
- /
- Proc severity/univariate

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 06-21-2016 09:15 AM
(991 views)

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

- 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;
```

2 REPLIES 2

- 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,

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. **

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.