Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: Interaction term in Poisson regression with PROC GENMOD

Options

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

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 01-29-2024 11:19 PM
(496 views)

This question is related to the thread at Re: Interaction term in modified poisson regression with proc GENMOD - SAS Support Communities

I am trying to do the same thing (i.e., using proc genmod to run an interaction analysis using relative risk regression with a binary outcome variable, poisson error distribution and a log link). I'm not sure how to format the estimate statements to request risk ratios for each level of the variable interacting w/ the independent variable of interest (CIG6C - Never, former, current). Any ideas how to revise this code?

```
proc genmod descending data=data_6;
class idno
reg_use (ref="No")
race1c (ref="WHITE")
gender1 (ref="FEMALE")
income6 (ref="≤ $49999")
educ1 (ref="< Bachelor's degree")
CIG6C (ref="NEVER")
/ param=glm
;
model htn (ref="No") = reg_use age6c gender1 income6 educ1 race1c drinks_wk CIG6C pamvcm6c bmi6c tchol_hdl_ratio glucose6 htn_meds lipid_meds dm_meds totmed6
reg_use*CIG6C
/ error=poisson link=log;
/* "By replacing link=log with link=identity in the MODEL statement, multivariate-adjusted risk (prevalence) differences are obtained" */
repeated subject=idno / type=ind;
/* The REPEATED statement in PROC GENMOD can also be used to obtain robust standard errors by specifying an independent correlation structure. */
/* Risk Ratios for each level of CIG6C */
/* I don't know how to write these statements... */
estimate 'Risk Ratio for CIG6C Former' CIG6C 1 0 / exp;
estimate 'Risk Ratio for CIG6C Current' CIG6C 0 1 / exp;
format
htn yes_no_fmt.
reg_use yes_no_fmt.
gender1 gender1f.
race1c race1c.
educ1 educ1fmt.
income6 income6fmt.
cig6c cig6cf.
htn
dyslipid
dm
htn_meds
lipid_meds
dm_meds yes_no_fmt.
;
run;
```

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

This is closely related to the LSMEANS statement, but you can also have a look at the syntax for the 'slice' statement. It looks to me like something along the lines of

slice reg_use*CIG6C / sliceBy = CIG6C diff exp;

may get you going in the right direction.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

The LSMEANS syntax provides the same estimates, but is less complex. It also solves the interaction issue. Thank you.

Do you know how I could derive a single p value for the interaction term? The Analysis Of GEE Parameter Estimates table has a p value for each level.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

You get a single p-value for each model term if you add the TYPE3 option in the MODEL statement. By default, there are score tests for a GEE model, or you can also add the WALD option to get Wald tests instead.

**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.

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.