Dear all,
I am trying to figure out how to get the RR/ OR with 95% CI for the same using repeated measure analysis using PROC GENMOD.
I have about 18 predictor variables, 15 of them are 0/1, with certain categories as control groups (please see my code below). Two variables have more than two levels and the last variable is a continuous variable. How do I get the RR/OR for all of the variables (categorical and continuous). I used lsmeans option but I can't get the continuous variable RR. Is there any other method to get the RR and ORs with 95% CI?
proc genmod data=Combined1;
class ID_No Race (ref="1") FebrileFlag (ref="1") Temp_HAI (ref="0") Temp_Grp (ref="1") Temp_Weekend (ref="0") Catheter_Use (ref="0") CentralLine_Use (ref="0") ELX_GRP_1 (ref="0") ELX_GRP_10 (ref="0") DM (ref="0")
ELX_GRP_15 (ref="0") ELX_GRP_14 (ref="0") ELX_GRP_17 (ref="0") SIRS (ref="0") WBC_Grp (ref="0") Ward (ref="12") Disc_Status (ref="1")/ param=glm;
model Relevant_BloodCult(event = '1') =Race FebrileFlag Temp_HAI Temp_Grp Temp_Weekend Catheter_Use CentralLine_Use ELX_GRP_1 ELX_GRP_10 DM ELX_GRP_15
ELX_GRP_14 ELX_GRP_17 SIRS WBC_Grp Ward Disc_Status LOS / dist=poisson link=log;
repeated subject = ID_No/ type=exch covb corrw;
lsmeans Race FebrileFlag Temp_HAI Temp_Grp Temp_Weekend Catheter_Use CentralLine_Use ELX_GRP_1 ELX_GRP_10 DM ELX_GRP_15 ELX_GRP_14 ELX_GRP_17 SIRS WBC_Grp Ward Disc_Status /diff exp cl;
run;
Please see the attached code.
Any help with the SAS code would be greatly appreciated.
Thanks!
Here are my other codes that I tried. param=ref in the first code. And estimate 1 -1/ exp in the second. But I am having issues with variable with more than 2 categories and continuous variable in the second set.
proc genmod data=Combined1;
class ID_No Race (ref="1") FebrileFlag (ref="1") Temp_HAI (ref="0") Temp_Grp (ref="1") Temp_Weekend (ref="0") Catheter_Use (ref="0") CentralLine_Use (ref="0") ELX_GRP_1 (ref="0") ELX_GRP_10 (ref="0") DM (ref="0")
ELX_GRP_15 (ref="0") ELX_GRP_14 (ref="0") ELX_GRP_17 (ref="0") SIRS (ref="0") WBC_Grp (ref="0") Ward (ref="12") Disc_Status (ref="1")/ param=ref;
model Relevant_BloodCult(event = '1') =Race FebrileFlag Temp_HAI Temp_Grp Temp_Weekend Catheter_Use CentralLine_Use ELX_GRP_1 ELX_GRP_10 DM ELX_GRP_15
ELX_GRP_14 ELX_GRP_17 SIRS WBC_Grp Ward Disc_Status LOS / dist=poisson link=log;
repeated subject = ID_No/ type=exch covb corrw;
lsmeans Race FebrileFlag Temp_HAI Temp_Grp Temp_Weekend Catheter_Use CentralLine_Use ELX_GRP_1 ELX_GRP_10 DM ELX_GRP_15 ELX_GRP_14 ELX_GRP_17 SIRS WBC_Grp Ward Disc_Status /diff exp cl;
run;
proc genmod data=Combined1;
class ID_No Race (ref="1") FebrileFlag (ref="1") Temp_HAI (ref="0") Temp_Grp (ref="1") Temp_Weekend (ref="0") Catheter_Use (ref="0") CentralLine_Use (ref="0") ELX_GRP_1 (ref="0") ELX_GRP_10 (ref="0") DM (ref="0")
ELX_GRP_15 (ref="0") ELX_GRP_14 (ref="0") ELX_GRP_17 (ref="0") SIRS (ref="0") WBC_Grp (ref="0") Ward (ref="12") Disc_Status (ref="1")/ param=ref ;
model Relevant_BloodCult(event = '1') =Race FebrileFlag Temp_HAI Temp_Grp Temp_Weekend Catheter_Use CentralLine_Use ELX_GRP_1 ELX_GRP_10 DM ELX_GRP_15
ELX_GRP_14 ELX_GRP_17 SIRS WBC_Grp Ward Disc_Status LOS / dist=poisson link=log;
repeated subject = ID_No/ type=exch covb corrw;
estimate "FebrileFlag" FebrileFlag 1 -1/ exp;
estimate "Temp_HAI" Temp_HAI 1 -1/ exp;
estimate "Temp_Grp" Temp_Grp 1 -1/ exp;
estimate "Temp_Weekend" Temp_Weekend 1 -1/ exp;
estimate "Catheter_Use" Catheter_Use 1 -1/ exp;
estimate "CentralLine_Use" CentralLine_Use 1 -1/ exp;
estimate "ELX_GRP_1" ELX_GRP_1 1 -1/ exp;
estimate "ELX_GRP_10" ELX_GRP_10 1 -1/ exp;
estimate "DM" DM 1 -1/ exp;
estimate "ELX_GRP_15" ELX_GRP_15 1 -1/ exp;
estimate "ELX_GRP_14" ELX_GRP_14 1 -1/ exp;
estimate "ELX_GRP_17" ELX_GRP_17 1 -1/ exp;
estimate "SIRS" SIRS 1 -1/ exp;
estimate "Ward" Ward 1 -1/ exp;
estimate "Disc_Status" Disc_Status 1 -1/ exp;
run;
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.