- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sas Support Group,
I have a model where I look at the accident risk of 3 different groups, including a dummy for group, the age category, gender, median income (standardized by subtracting the mean and dividing by two standard deviation) and an interaction between median income and the groups, since I believe that the effect of income on each group will be different.
To be able to interpret the effect, I used the statement estimate, however I am not totally sure if I gave the right formula, although I do get some results.
What I have as code is the following:
genmod data=data1 desc;
group gender age_cat;
coll1=group age_cat gender st_medinc group*st_medinc / dist=binomial link=log type3;
'group1 versus group3' group*st_medinc 1 0 -1/exp;
'group1 versus group2' group*st_medinc 1 -1 0 /exp;
'group2 versus group3' group*st_medinc 0 1 -1 /exp;
Could someone have a look and confirm if I did it correctly or if I need to correct the estimate statement somewhere?
Thanks in advance for your help,
Regards,
Krisztina Gurzo
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't know what version of SAS/STAT you are using, but if it is 12.1, try changing to the LSMESTIMATE statement. Something like:
lsmestimate group '1 v 3' 1 0 -1,
'1 v 2' 1 -1 0,
'2 v 3' 0 1 -1/exp at= <insert desired value for st_medinc>;
This presupposes a significant group*st_medinc effect, so that the estimation should be done at a low value of st_medinc, the mean value of st_medinc, and a high value of st_medinc. If the interaction is not significant, then comparison at the mean value will be as informative as at any other specific value.
Also, be sure you want to use link=log, as the canonical link for the binomial distribution is the logit.
Steve Denham
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I don't know what version of SAS/STAT you are using, but if it is 12.1, try changing to the LSMESTIMATE statement. Something like:
lsmestimate group '1 v 3' 1 0 -1,
'1 v 2' 1 -1 0,
'2 v 3' 0 1 -1/exp at= <insert desired value for st_medinc>;
This presupposes a significant group*st_medinc effect, so that the estimation should be done at a low value of st_medinc, the mean value of st_medinc, and a high value of st_medinc. If the interaction is not significant, then comparison at the mean value will be as informative as at any other specific value.
Also, be sure you want to use link=log, as the canonical link for the binomial distribution is the logit.
Steve Denham
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
Thank you very much for your answer, I have not used the lsmestimate before, but my version indeed allows for it. I wanted to use the link=log to get the risk ratio instead of the odds ratio. It works perfectly and the results are very reasonable. I will use it more in the future.
Thanks again for your response, it was very helpful!
Krisztina Gurzo