Learn R Programming

DescTools (version 0.99.6)

PoissonCI: Poisson Confidence Interval

Description

Computes the confidence intervals of a poisson distributed variable's lambda. Several methods are implemented, see details.

Usage

PoissonCI(x, conf.level = 0.95, 
          method = c("score", "wald", "agresti-coull", "garwood"), 
          na.rm = FALSE)

Arguments

x
a numeric vector.
conf.level
confidence level, defaults to 0.95.
method
character string specifing which method to use; can be one out of "wald", "score", "agresti-coull", "garwood". Method can be abbreviated. See details. Defaults to "score".
na.rm

Value

  • A vector with 3 elements for estimate, lower confidence intervall and upper for the upper one.

Details

The Wald interval is obtained by inverting the acceptance region of the Wald large-sample normal test. The Agresti-Coull interval was proposed by Agresti and Coull (1998) and is a slight modification of the Wilson interval. The Agresti-Coull intervals are never shorter than the Wilson intervals.

References

A. Agresti and B.A. Coull (1998) Approximate is better than "exact" for interval estimation of binomial proportions. American Statistician, 52, pp. 119-126. http://www.math.montana.edu/~rjboik/classes/502/ci.pdf http://www.ine.pt/revstat/pdf/rs120203.pdf

See Also

BinomCI, MultinomCI

Examples

Run this code
x <- rpois(100, lambda=4)

PoissonCI(x, method="wald")
PoissonCI(x, method="garwood")

Run the code above in your browser using DataLab