BookmarkSubscribeRSS Feed
sms1891
Quartz | Level 8

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!

2 REPLIES 2
sms1891
Quartz | Level 8

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;

 

StatDave
SAS Super FREQ

See this note about estimating relative risks and this note about estimating odds ratios in GENMOD.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 1764 views
  • 1 like
  • 2 in conversation