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
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;
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;
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.
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;
Even after testing all of these distributions, it still is able to determine that x is most likely log normal.
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!
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.