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.
You don't need to use the ESTIMATE statement, and shouldn't when you can use the LSMEANS (and related) statement which doesn't require you to determine appropriate coefficients. Use the LSMEANS statement with the DIFF and EXP options as illustrated in this note. See the "Zou's modified Poisson approach" section of the note.
You don't need to use the ESTIMATE statement, and shouldn't when you can use the LSMEANS (and related) statement which doesn't require you to determine appropriate coefficients. Use the LSMEANS statement with the DIFF and EXP options as illustrated in this note. See the "Zou's modified Poisson approach" section of the note.
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.
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.