3 weeks ago
I have a model that requires a GLM with a log link and gamma distribution. The dependent variable is continuous and the independent variables are all dummies. The code ran for the procedure is:
PROC GENMOD DATA = TEST;
CLASS SEX_CAT BLACK_NH ASIAN_NH HISPANIC;
MODEL PRICE = SEX_CAT BLACK_NH ASIAN_NH HISPANIC / DIST = GAMMA LINK = LOG TYPE1;
Output is as follows:
Intercept 1 6.9972 0.0513 6.8966 7.0978 18588.4 <.0001 SEX_CAT 0 1 -0.2171 0.0152 -0.2469 -0.1872 203.23 <.0001 SEX_CAT 1 0 0.0000 0.0000 0.0000 0.0000 . . BLACK_NH 0 1 0.2042 0.0226 0.1599 0.2484 81.84 <.0001 BLACK_NH 1 0 0.0000 0.0000 0.0000 0.0000 . . ASIAN_NH 0 1 0.7420 0.0347 0.6740 0.8100 457.63 <.0001 ASIAN_NH 1 0 0.0000 0.0000 0.0000 0.0000 . . HISPANIC_NH 0 1 0.7626 0.0200 0.7234 0.8018 1451.48 <.0001 HISPANIC_NH 1 0 0.0000 0.0000 0.0000 0.0000 . . Scale 1 0.3002
How would one interpret the coefficients of sex_cat or black_nh? From another SAS message board I read that:
With a log link and a continuous predictor, you are fitting the model:
ln(mu) = beta0 + beta1*X,
where mu is the expected value. Then, e raised to the left and right sides gives:
mu = exp(beta0 + beta1*X) = exp(beta0)*exp(beta1*X)
So would the interpretation for sex_cat be: exp(6.9972)(exp(-0.2171)?
Additionally, sex_cat eq 1 is female and sex_cat eq 0 equals male - so would the negative be associated with the males in comparison to females? Meaning exp(6.9972) is female, and exp(6.9972)*exp(-0.2171) is for males?
3 weeks ago
i would guess it's just an estimate statement with the exp option as follows
estimate 'Exp(sex_cat)' sex_cat 1 / exp cl ;
but make sure the results make sense
2 weeks ago - last edited 2 weeks ago
Since the log function is monotonically increasing, you can interpret the parameter signs without thinking in terms of the exponentiated model. That is, the negative parameter for Sex=0 (male) indicates that being male decreases the mean response. If you need an estimate of the effect, then use the LSMEANS statement with the ILINK option: lsmeans sex / ilink;
BTW, the name of your weight variable indicates that you are attempting to analyze survey data. In general, a proper analysis can only be done using the SURVEY procedures (SURVEYMEANS, SURVEYREG, etc.) since procedures like GENMOD do not incorporate the necessary variance estimators. Unfortunately, there is no SURVEY procedure for fitting a log-linked gamma model.