| Date: | Fri, 11 Nov 2011 14:41:13 -0600 |
| Reply-To: | Robin R High <rhigh@UNMC.EDU> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Robin R High <rhigh@UNMC.EDU> |
| Subject: | Re: What is the upper confidence limit if rate = 0 |
|
| In-Reply-To: | <201111111736.pABHSfK3002956@waikiki.cc.uga.edu> |
| Content-Type: | text/plain; charset="US-ASCII" |
|---|
There are two contexts of the rate computation to consider. If it is a
count from a binomial distribution setting, y successes in n trials, you
could run:
DATA upv(keep=y tot)
upvr(keep=lvl yy);
INPUT y tot;
OUTPUT upv;
lvl=1; yy=y; OUTPUT upvr;
lvl=2; yy=tot-y; OUTPUT upvr;
cards;
0 58
;
proc print data = upvr; run;
ods select onewayfreqs BinomialCLs ;
proc freq data=upvr;
TABLES lvl / cl binomial(all level=1) alpha=0.05 ;
weight yy / zero;
title "Binomial Confidence intervals"; run;
run;
If it is a count, y, based on a exposure variable, tot, then:
proc print data = upv; run;
DATA tst;
SET upv;
alpha = .05 ;
mean = y / tot ;
dfLL = 2*y ; chL = cinv( alpha/2 ,dfLL);
LL = chL /(2*tot); IF y = 0 then LL=0;
dfUL = 2*(y+1); chU = cinv(1-(alpha/2),dfUL);
UL = chU /(2*tot);
run;
proc print DATA=tst NOObs; var alpha y tot ll mean ul; format ll mean ul
7.4;
title "Exact Poisson interval"; run;
Robin High
UNMC
From:
Vladimir Grechko <vlad.grechko@MAIL.RU>
To:
SAS-L@LISTSERV.UGA.EDU
Date:
11/11/2011 11:37 AM
Subject:
What is the upper confidence limit if rate = 0
Sent by:
"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
People,
I have 0 events over a certain observation period. I need to report Mean
(LCL, UCL). My Mean = LCL = 0, but an event _could_ happen, so the upper
CL
is different than 0. What should it be? How can I calculate it?
Thank you!
|