Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: Confidence interval for proportions


From   Joe Canner <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: Confidence interval for proportions
Date   Mon, 10 Mar 2014 16:08:31 +0000

Peter,

How about:

forvalues x=1/`=_N' {
  cii time[`x'] events[`x'], poisson    // modify to taste
}

Regards,
Joe Canner
Johns Hopkins University School of Medicine

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Jansen
Sent: Monday, March 10, 2014 11:51 AM
To: [email protected]
Subject: st: Confidence interval for proportions

I am look for a way to generate binomial confidence intervals for a database containing time / event data. Database looks like: 

events   time   lcl  ucl
1   100
2 150 
etc. 

One could obviously use the cii command, but in that case one needs to calculate it manually for each observation. The ci command calculates the confidence interval for the whole variable. 

Thanks in advance for any hints. 

PJ
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index