BookmarkSubscribeRSS Feed
HS2
Fluorite | Level 6 HS2
Fluorite | Level 6

Hello,

If I have a variable X with N observations and Min and Max values, how can I find the parameters of a log normal distribution that fits X's distribution?

 

Thanks

1 REPLY 1
Stu_SAS
SAS Employee

PROC SEVERITY will estimate the distribution of data and give you the closest estimates. You can choose the distributions you'd like it to estimate and it will identify the most likely distribution and its estimates. Since you know it's log normal, you can tell it to estimate only the parameters of a log normal distribution.

 

Let's simulate a lognormal distribution with Mu=0 and Sigma=0.5:

data logn;
    call streaminit(12345);
    do i = 1 to 10000;
        x = rand('lognormal', 0, 0.5);
        output;
    end;
run;

Stu_SAS_7-1676642251308.png

 

 

Next, let's use PROC SEVERITY to estimate the parameters of this distribution assuming we know it is log normal.

proc severity data=logn;
    loss x;
    dist logn;
run;

Stu_SAS_4-1676641801164.png

 

While not perfect, it's pretty close at getting the right answer: Mu is very close to 0, and Sigma is within about 0.004 decimal points of the true value. 

 

Stu_SAS_2-1676641757917.png

Let's say you didn't know the distribution. You can test a variety of distributions, including custom distributions, with PROC SEVERITY. 

proc severity data=logn;
    loss x;
    dist _ALL_;
run;

Stu_SAS_5-1676642115886.png

Even after testing all of these distributions, it still is able to determine that x is most likely log normal.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 472 views
  • 1 like
  • 2 in conversation