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;
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.
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.
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!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.