BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
_maldini_
Barite | Level 11

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
StatDave
SAS Super FREQ

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.

View solution in original post

4 REPLIES 4
StatDave
SAS Super FREQ

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.

Mike_N
SAS Employee

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. 

_maldini_
Barite | Level 11

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. 

StatDave
SAS Super FREQ
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.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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.

Discussion stats
  • 4 replies
  • 1296 views
  • 9 likes
  • 3 in conversation