Which procedure to use to fit Log-Gamma distribution?
If you are talking about fitting a parametric model to univariate data, you can
1) use PROC IML to fit the maximum likelihood estimates for the log-gamma model: http://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml.html
2) exponentiate and use PROC UNIVARIATE to fit a gamma distribution on the transformed data
Thanks for reply!
Since I want to simulate random numbers from log-gamma. Is it okay if I take the Log of obsv, fit gamma using Proc Univariate and exponentiate the simulated random numbers to get log-gamma rand. no.s?
Yes. The result to keep in mind is that if X is log-gamma distributed, then Y = log(X) has a gamma distribution. So yes, you can use PROC UNIVARIATE to fit the parameters for Y. Then you can use those parameters to simulate gamma data, and exponentiate those random variates to simulate the original data.
Cool...thanks a lot!!!!!!
If you are asking how to fit a log-linear model to a gamma-distributed response variable, you can do that in PROC GLIMMIX or PROC GENMOD. For example, if Y is a gamma-distributed response, the following statements fit the model (with X1 and X2 as predictors) log(mean) = intercept + b1*x1 + b2*x2 :
proc genmod;
model y = x1 x2 / dist=gamma link=log;
run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.