# pois.conf.int: Confidence intervals for Poisson counts or rates In epitools: Epidemiology Tools

## Description

Calculates confidence intervals for Poisson counts or rates

## Usage

 ```1 2 3 4``` ```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)

## 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.

## 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

## Author(s)

Tomas Aragon, [email protected], https://repitools.wordpress.com/; with contributions by Francis Dimzon, [email protected]; with contributions by Scott Nabity, [email protected]

## References

Tomas Aragon, et al. Applied Epidemiology Using R. Available at http://www.phdata.science

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.

`binom.exact`

## Examples

 ```1 2 3 4 5 6 7 8``` ```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) ```

### Example output

```    x pt rate      lower     upper conf.level
1   1  1    1 0.02528957  5.571643       0.95
2   2  1    2 0.24220364  7.224693       0.95
3   3  1    3 0.61867122  8.767277       0.95
4   4  1    4 1.08988915 10.241589       0.95
5   5  1    5 1.62348566 11.668322       0.95
6   6  1    6 2.20189110 13.059479       0.95
7   7  1    7 2.81435753 14.422675       0.95
8   8  1    8 3.45383142 15.763189       0.95
9   9  1    9 4.11538094 17.084805       0.95
10 10  1   10 4.79538859 18.390358       0.95
x  pt       rate        lower      upper conf.level
1   1 101 0.00990099 0.0002503918 0.05516479       0.95
2   2 102 0.01960784 0.0023745455 0.07083032       0.95
3   3 103 0.02912621 0.0060065167 0.08511919       0.95
4   4 104 0.03846154 0.0104797034 0.09847681       0.95
5   5 105 0.04761905 0.0154617682 0.11112688       0.95
6   6 106 0.05660377 0.0207725576 0.12320263       0.95
7   7 107 0.06542056 0.0263024069 0.13479136       0.95
8   8 108 0.07407407 0.0319799206 0.14595545       0.95
9   9 109 0.08256881 0.0377557884 0.15674133       0.95
10 10 110 0.09090909 0.0435944417 0.16718508       0.95
x pt rate      lower     upper conf.level
1   1  1    1 0.02531781  5.571643       0.95
2   2  1    2 0.24220928  7.224688       0.95
3   3  1    3 0.61867212  8.767273       0.95
4   4  1    4 1.08986537 10.241589       0.95
5   5  1    5 1.62348639 11.668332       0.95
6   6  1    6 2.20189425 13.059474       0.95
7   7  1    7 2.81436305 14.422675       0.95
8   8  1    8 3.45383218 15.763189       0.95
9   9  1    9 4.11537310 17.084803       0.95
10 10  1   10 4.79538870 18.390356       0.95
x  pt       rate        lower      upper conf.level
1   1 101 0.00990099 0.0002506714 0.05516479       0.95
2   2 102 0.01960784 0.0023746008 0.07083027       0.95
3   3 103 0.02912621 0.0060065255 0.08511916       0.95
4   4 104 0.03846154 0.0104794747 0.09847681       0.95
5   5 105 0.04761905 0.0154617751 0.11112697       0.95
6   6 106 0.05660377 0.0207725873 0.12320259       0.95
7   7 107 0.06542056 0.0263024584 0.13479136       0.95
8   8 108 0.07407407 0.0319799276 0.14595546       0.95
9   9 109 0.08256881 0.0377557165 0.15674132       0.95
10 10 110 0.09090909 0.0435944427 0.16718505       0.95
x pt rate      lower     upper conf.level
1   1  1    1 0.09069458  4.662073       0.95
2   2  1    2 0.39884141  6.410834       0.95
3   3  1    3 0.83027534  8.003670       0.95
4   4  1    4 1.33731738  9.510080       0.95
5   5  1    5 1.89638763 10.959559       0.95
6   6  1    6 2.49398174 12.367878       0.95
7   7  1    7 3.12155170 13.744642       0.95
8   8  1    8 3.77329325 15.096212       0.95
9   9  1    9 4.44505618 16.427064       0.95
10 10  1   10 5.13375332 17.740482       0.95
x  pt       rate        lower      upper conf.level
1   1 101 0.00990099 0.0008979662 0.04615914       0.95
2   2 102 0.01960784 0.0039102099 0.06285132       0.95
3   3 103 0.02912621 0.0080609256 0.07770553       0.95
4   4 104 0.03846154 0.0128588210 0.09144308       0.95
5   5 105 0.04761905 0.0180608346 0.10437675       0.95
6   6 106 0.05660377 0.0235281296 0.11667809       0.95
7   7 107 0.06542056 0.0291733804 0.12845459       0.95
8   8 108 0.07407407 0.0349379004 0.13977975       0.95
9   9 109 0.08256881 0.0407803319 0.15070701       0.95
10 10 110 0.09090909 0.0466704847 0.16127711       0.95
x pt rate       lower     upper conf.level
1   1  1    1 -0.95996398  2.959964       0.95
2   2  1    2 -0.77180765  4.771808       0.95
3   3  1    3 -0.39475720  6.394757       0.95
4   4  1    4  0.08007203  7.919928       0.95
5   5  1    5  0.61738730  9.382613       0.95
6   6  1    6  1.19908832 10.800912       0.95
7   7  1    7  1.81442272 12.185577       0.95
8   8  1    8  2.45638470 13.543615       0.95
9   9  1    9  3.12010805 14.879892       0.95
10 10  1   10  3.80204968 16.197950       0.95
x  pt       rate         lower      upper conf.level
1   1 101 0.00990099 -0.0095045939 0.02930657       0.95
2   2 102 0.01960784 -0.0075667417 0.04678243       0.95
3   3 103 0.02912621 -0.0038325942 0.06208502       0.95
4   4 104 0.03846154  0.0007699234 0.07615315       0.95
5   5 105 0.04761905  0.0058798790 0.08935822       0.95
6   6 106 0.05660377  0.0113121540 0.10189539       0.95
7   7 107 0.06542056  0.0169572217 0.11388390       0.95
8   8 108 0.07407407  0.0227443028 0.12540385       0.95
9   9 109 0.08256881  0.0286248445 0.13651277       0.95
10 10 110 0.09090909  0.0345640880 0.14725409       0.95
```

epitools documentation built on Nov. 17, 2017, 7:58 a.m.