poisson.ci: Exact Poisson confidence intervals.

poisson.ciR Documentation

Exact Poisson confidence intervals.

Description

A wrapper for the poisson.test that allows for vector values.

Usage

poisson.ci(x, T = 1, alternative = c("two.sided", "less", "greater"), conf.level = 0.95)

Arguments

x

number of events.

T

time base for event count.

alternative

indicates the type of confidence interval and must be one of "two.sided", "greater" or "less". You can specify just the initial letter.

conf.level

confidence level for the returned confidence interval.

Details

This uses a vectorised algorithm based on stats::poisson.test.

Value

A matrix (or vector) with columns giving lower and upper confidence limits for each parameter. These will be labelled as (1-level)/2 and 1 - (1-level)/2 in % (by default 2.5% and 97.5%). for the two-sided alternative.

See Also

poisson.test

Examples

### These are paraphrased from data sets in the ISwR package

## SMR, Welsh Nickel workers
poisson.ci(137, 24.19893)

## eba1977, compare Fredericia to other three cities for ages 55-59
poisson.ci(c(11, 6+8+7), c(800, 1083+1050+878))

biostat3 documentation built on Oct. 29, 2024, 5:07 p.m.