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

Hi,

I try to use proc genmod to estimate two risk ratios because the predictor of smokes has three levels (never, current, and former smokers). Would you please tell me how to do that? Here is the SAS syntax I made. Thank you in advance.

 

proc genmod ;
class seqn smokes /param=ref ref=first;
model lung_cancer=smokes /dist=poi link=log;
repeated subject=seqn;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

See this note on estimating risk ratios (relative risks). As shown there, you can use PROC LOGISTIC with LSMEANS followed by the NLMeans macro or PROC GENMOD, again with an LSMEANS statement. Since the latter seems to be the approach you are taking, you just need to add an LSMEANS statement with the DIFF, EXP, and CL options (assuming you want confidence intervals). The LSMEANS statement will handle however many levels are in the predictor. But you will need to change PARAM=REF to PARAM=GLM to use the LSMEANS statement.

View solution in original post

2 REPLIES 2
StatDave
SAS Super FREQ

See this note on estimating risk ratios (relative risks). As shown there, you can use PROC LOGISTIC with LSMEANS followed by the NLMeans macro or PROC GENMOD, again with an LSMEANS statement. Since the latter seems to be the approach you are taking, you just need to add an LSMEANS statement with the DIFF, EXP, and CL options (assuming you want confidence intervals). The LSMEANS statement will handle however many levels are in the predictor. But you will need to change PARAM=REF to PARAM=GLM to use the LSMEANS statement.

hongjie76
Calcite | Level 5
Many thanks. It works. Hongjie

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 527 views
  • 1 like
  • 2 in conversation