turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Estimate statement with interaction terms

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-31-2014 07:05 PM

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

Solution

04-01-2014
08:54 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to kgurzo

04-01-2014 08:54 AM

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

All Replies

Solution

04-01-2014
08:54 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to kgurzo

04-01-2014 08:54 AM

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
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to SteveDenham

04-01-2014 11:20 AM

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