BookmarkSubscribeRSS Feed
SJ1991
Calcite | Level 5

I wanted to understand the math behind the caluclation of Parameter Estimates in the following code. I wnat ot undertsand how the values of theta, scale and shape are computed in SAS, when we equate them to "est". It would be great if anyone could help me understand this. 

 

Code:

 

data Plates;
label Gap = 'Plate Gap in cm';
input Gap @@;
datalines;
-0.746 0.357 0.376 0.327 0.485 1.741 0.241 0.777 0.768 0.409
0.252 0.512 0.534 1.656 0.742 0.378 0.714 1.121 0.597 0.231
0.541 0.805 0.682 0.418 0.506 0.501 0.247 0.922 0.880 0.344
0.519 1.302 0.275 0.601 0.388 0.450 0.845 0.319 0.486 0.529
1.547 0.690 0.676 0.314 0.736 0.643 0.483 0.352 0.636 1.080
;


title 'Distribution of Plate Gaps';
ods output ParameterEstimates GoodnessOfFit FitQuantiles MyHist;
proc univariate data=Plates;
var Gap;
histogram / midpoints=0.2 to 1.8 by 0.2
lognormal(theta=est sigma=est zeta=est)
weibull (theta=est sigma=est c=est)
gamma (theta=est sigma=est alpha=est)
normal
vaxis = axis1
name = 'MyHist';
inset n mean(5.3) std='Std Dev'(5.3) skewness(5.3)
/ pos = ne header = 'Summary Statistics';
axis1 label=(a=90 r=0);

 

Thanks
run;

6 REPLIES 6
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

The User's Guide (avaiable on line) should explain how parameters are estimated in UNIVARIATE for the different distributions. In general, moment estimates are used.

Rick_SAS
SAS Super FREQ

I disagree with lvm. In general UNIVARIATE uses maximum likelihood estimation.

 

Moments are used for Normal. Percentile fitting (optionally, moments) are used for the bounded and unbounded Johnson distribution. I believe the remining use MLE.

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

RIck is right, of course. I was thinking of something else.

SJ1991
Calcite | Level 5
Thanks Rick.
I understand that these are defined using MLE.
Is there any guide that can help me understand how these values are calculated (step wise calculation of these statements)?

It would be of great help.
Rick_SAS
SAS Super FREQ

The MLE estimates are obtained by nonlinear optimization of a likelihood or log-likelihood function. For an example, with step-by-step details, see the article "Maximum likelihood estimation in SAS/IML."

SJ1991
Calcite | Level 5
Thank you Rick!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1464 views
  • 0 likes
  • 3 in conversation