I have a binary outcome variable and covariates with multiple categories.
I am trying to estimate adjusted risk ratios and confidence intervals.
I reviewed previous discussions in SAS forum about this topic
https://communities.sas.com/t5/Statistical-Procedures/RR-estimates-using-proc-Genmod-for-categorical
https://academic.oup.com/aje/article/162/3/199/171116
but these don't help when I have a covariate with multiple categories because the output it produces are not meaningful for multiple category.
It works well when I use lsmeans option
proc genmod data =xyz;
class id x (ref = "5") y (ref = "M") z(ref = "Q1") / param =glm;
model one_dose (event='1') = x y z/ dist = binomial link = log;
lsmeans x y z / diff exp cl;
run;
but I want to use modified Poisson because prevalence of outcome is high. over 50% as a very similar study as mine used modified poisson regression.
https://www.thelancet.com/action/showPdf?pii=S2468-2667%2822%2900037-8
My code is as follows;
proc genmod data =xyz;
class id x (ref = "5") y (ref = "M") z(ref = "Q1") / param =ref;
model one_dose (event='1') = x y z/ dist = poisson link = log;
repeated subject = id/ type = unstr;
Estimate "RR x" x 1/exp;
Estimate "RR y" y 1/exp;
Estimate "RR z" z 1/exp;
run;
So, basically, my question is how do we write the "estimate" statements when the covariate has multiple categories and how to assign a reference category in a modified Poisson model.
Thanks a lot
Yuba
Is there some reason that you feel you can't use the same LSMEANS statement in your second set of code like you did you your first set of code? See the Modified Poisson section of this note.
Is there some reason that you feel you can't use the same LSMEANS statement in your second set of code like you did you your first set of code? See the Modified Poisson section of this note.
Great @StatDave
This modification works; I initially wrote param=ref, however, param=glm works as you mentioned in one of the previous posts.
proc genmod data =xyz;
class id x (ref = "5") y (ref = "M") z(ref = "Q1") / param =glm;
model one_dose (event='1') = x y z/ dist = poisson link = log;
repeated subject = id/ type = unstr;
lsmeans x y z/ diff exp cl;
run;
Any idea how to assign a reference category, because it does not show results for first category as a reference category.
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 25. 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.