Is it possible to calculate Clopper-Pearson CIs for Proportions of zero.
I have 0 obs in output, but i have created a dummy like with count of 0.
var trt count
A trt1 0
B trt2 0
C trt3 0
Is it possible to calculate Clopper-Pearson CIs for Proportions of zero. I only require upper and lower limits per trt.
Thanks,
vijay
Hi @Vijay77
Here seems to be a useful link: https://www.phusewiki.org/docs/2015_Lonavala_SDE/Presentations/Clopper-Pearson%20Confidence%20Interv...
Hello @Vijay77,
@Vijay77 wrote:
var trt count
A trt1 0
B trt2 0
C trt3 0
Is it possible to calculate Clopper-Pearson CIs for Proportions of zero. I only require upper and lower limits per trt.
Yes, this is possible, but you need the group totals for the calculation. I have mocked up the missing data in the example below (25 subjects in treatment group 1, 30 in group 2 and 40 in group 3).
data have;
input var $ trt $ count;
cards;
A trt1 0
X trt1 25
B trt2 0
Y trt2 30
C trt3 0
Z trt3 40
;
proc freq data=have;
by trt;
weight count / zeros;
tables var / binomial(level=1);
run;
Without the ZEROS option of the WEIGHT statement PROC FREQ would ignore the observations with COUNT=0. You find the 95%-Clopper-Pearson CIs in section "Exact Conf Limits" of the output (for each BY group), as usual. I leave it to you to make adjustments for multiplicity, if desired.
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.