Performs an exact test of a simple null hypothesis about the rate parameter in Poisson distribution, or for the ratio between two rate parameters.
poisson.test(x, T = 1, r = 1,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95)
number of events. A vector of length one or two.
time base for event count. A vector of length one or two.
hypothesized rate or rate ratio
indicates the alternative hypothesis and must be
one of "two.sided"
, "greater"
or "less"
.
You can specify just the initial letter.
confidence level for the returned confidence interval.
A list with class "htest"
containing the following components:
the number of events (in the first sample if there are two.)
the corresponding expected count
the p-value of the test.
a confidence interval for the rate or rate ratio.
the estimated rate or rate ratio.
the rate or rate ratio under the null,
r
.
a character string describing the alternative hypothesis.
the character string "Exact Poisson test"
or
"Comparison of Poisson rates"
as appropriate.
a character string giving the names of the data.
Confidence intervals are computed similarly to those of
binom.test
in the one-sample case, and using
binom.test
in the two sample case.
# NOT RUN {
### These are paraphrased from data sets in the ISwR package
## SMR, Welsh Nickel workers
poisson.test(137, 24.19893)
## eba1977, compare Fredericia to other three cities for ages 55-59
poisson.test(c(11, 6+8+7), c(800, 1083+1050+878))
# }
Run the code above in your browser using DataLab