Computes a confidence interval for the Poisson counts.
poiCI(x, conf.level = 0.95, type = c("exact", "daly", "byar", "asymptotic"), verbose = FALSE)
x | A single number or vector that represents the number of observed successes. |
---|---|
conf.level | A number that indicates the level of confidence to use for constructing confidence intervals (default is |
type | A string that identifies the type of method to use for the calculations. See details. |
verbose | A logical that indicates whether |
A #x2 matrix that contains the lower and upper confidence interval bounds as columns and, if verbose=TRUE
x
.
Computes a CI for the Poisson counts using the exact
, gamma distribution (daly
`), Byar's (byar
), or normal approximation (asymptotic
) methods. This is largely a wrapper to pois.exact
, pois.daly
, pois.byar
, and pois.approx
functions documented in pois.conf.int
in epitools.
See pois.exact
, pois.daly
, pois.byar
, and pois.approx
(documented in pois.conf.int
) in epitools for more description and references.
## Demonstrates using all types at once poiCI(12)#> 95% LCI 95% UCI #> Exact 6.200603 20.96156 #> Daly 6.200575 20.96159 #> Byar 6.552977 20.32447 #> Asymptotic 5.210486 18.78951## Selecting types poiCI(12,type="daly")#> 95% LCI 95% UCI #> 6.200575 20.96159poiCI(12,type="byar")#> 95% LCI 95% UCI #> 6.552977 20.32447poiCI(12,type="asymptotic")#> 95% LCI 95% UCI #> 5.210486 18.78951poiCI(12,type="asymptotic",verbose=TRUE)#> x 95% LCI 95% UCI #> Asymptotic 12 5.210486 18.78951poiCI(12,type=c("exact","daly"))#> 95% LCI 95% UCI #> Exact 6.200603 20.96156 #> Daly 6.200575 20.96159poiCI(12,type=c("exact","daly"),verbose=TRUE)#> x 95% LCI 95% UCI #> Exact 12 6.200603 20.96156 #> Daly 12 6.200575 20.96159## Demonstrates use with multiple inputs poiCI(c(7,10),type="exact")#> 95% LCI 95% UCI #> 2.814358 14.42268 #> 4.795389 18.39036poiCI(c(7,10),type="exact",verbose=TRUE)#> x 95% LCI 95% UCI #> [1,] 7 2.814358 14.42268 #> [2,] 10 4.795389 18.39036