This is more of a statistics question than a SAS question but I was wondering if it were possible to calculate 1-RR and its 95% CI in SAS when all participants experienced the event of interest.
data have;
input trt $ cnt tot flag;
cards;
1 0 4 0
1 4 4 1
2 0 8 0
2 8 8 1
3 0 6 0
3 6 6 1
;
run;
proc freq data= have;
weight cnt;
tables flag*trt / out= _ve_ relrisk(method= fm);
run;
The above code doesn't work since there are no subjects with FLAG=0 (i.e. did not develop disease). I am trying to calculate vaccine efficacy defined by 1-RR, but if I can't calculate that, then is there a reasonable alternative I can use in SAS?
Firstly, RELRISK need 2x2 contingency table ,but yours is 2x3 .
Secondly, the count of flag=0 is zero . SAS also can't calculated it .
Check your data firstly.
data have;
input trt $ cnt tot flag;
cards;
1 0 4 0
1 4 4 1
2 0 8 0
2 8 8 1
3 0 6 0
3 6 6 1
;
run;
proc freq data= have;
where trt in ('1' '2');
weight cnt/zero ;
tables flag*trt/nocol norow nopercent relrisk(NONINFERIORITY method= fm);
exact relrisk;
run;
A similar topic (CI for a proportion) was discussed in a previous thread.
The suggestion there was to use the EXACT BINOMIAL statement in PROC FREQ.
Wouldn't using exact binomial be different from relative risk? I already used binomial(cl= wilson); exact binomial; to obtain the infection rate, but I am trying to find RR to obtain the vaccine efficacy.
Would the hazard ratio make an okay approximation since 100% of subjects experienced the event?
> Wouldn't using exact binomial be different from relative risk?
Correct. I wanted to direct you to the other discussion and its references in case anything there was relevant to your question.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.