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)
Count of events
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)
#> rate lci uci
#> 1 0.1 0.01408584 0.7099327
dat <- data.frame(n = 5, denom = 25) # replicates output from openepi just fine.
rate_confint(dat$n, dat$denom)
#> rate lci uci
#> 1 0.2 0.08324422 0.4805138