BookmarkSubscribeRSS Feed
Vijay77
Fluorite | Level 6

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

 

2 REPLIES 2
FreelanceReinh
Jade | Level 19

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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1263 views
  • 1 like
  • 3 in conversation