Learn R Programming

epitools (version 0.5-7)

pois.conf.int: Confidence intervals for Poisson counts or rates

Description

Calculates confidence intervals for Poisson counts or rates

Usage

pois.exact(x, pt = 1, conf.level = 0.95) pois.daly(x, pt = 1, conf.level = 0.95) pois.byar(x, pt = 1, conf.level = 0.95) pois.approx(x, pt = 1, conf.level = 0.95)

Arguments

x
count or vector of counts
pt
person-time at risk (default = 1) or vector of person-times
conf.level
confidence level (default = 0.95)

Value

This function returns a n x 6 matrix with the following colnames:
x
Poisson count
pt
person-time at risk
rate
crude rate = x/pt
lower
lower confidence interval limit
upper
upper confidence interval limit
conf.level
confidence level

Details

These functions calculate confidence intervals for a Poisson count or rate using an exact method (pois.exact), gamma distribution (pois.daly), Byar's formula (pois.byar), or normal approximation to the Poisson distribution (pois.approx).

To calculate an exact confidence interval for a crude rate (count divided by person-time at risk), set pt equal to the person-time at risk. Both x and pt can be either a number or a vector of numbers.

The pois.daly function gives essentially identical answers to the pois.exact function except when x = 0. When x = 0, for the upper confidence limit pois.exact returns 3.689 and pois.daly returns 2.996.

References

Tomas Aragon, et al. Applied Epidemiology Using R. Available at http://medepi.com

Leslie Day (1992), "Simple SAS macros for the calculation of exact binomial and Poisson confidence limits." Comput Biol Med, 22(5):351-361 Kenneth Rothman (2002), Epidemiology: An Introduction, Oxford University Press, 1st Edition.

See Also

binom.exact

Examples

Run this code
pois.exact(1:10)
pois.exact(1:10, 101:110)
pois.daly(1:10)
pois.daly(1:10, 101:110)
pois.byar(1:10)
pois.byar(1:10, 101:110)
pois.approx(1:10)
pois.approx(1:10, 101:110)

Run the code above in your browser using DataLab