rate_confint | R Documentation |
Calculates a 95 percent confidence interval for a rate using the Rothman/Greenland method described in http://www.openepi.com/PDFDocs/PersonTime1Doc.pdf.
rate_confint(numerator, denominator)
numerator |
Count of events |
denominator |
Count of person-years |
A data frame with three columns giving the rate, lower confidence interval and upper confidence interval.
dat <- data.frame(n = 1, denom = 10) rate_confint(dat$n, dat$denom) dat <- data.frame(n = 5, denom = 25) # replicates output from openepi just fine. rate_confint(dat$n, dat$denom)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.