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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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