chisq.pois: Chi-square goodness of fit test for Poisson distribution

View source: R/ChisqPois.R

chisq.poisR Documentation

Chi-square goodness of fit test for Poisson distribution

Description

This function performs a chi-square goodness of fit test for a Poisson distribution.

Usage

chisq.pois(x, f, lambda = NULL)

Arguments

x

The observed values

f

The observed counts.

lambda

Poisson parameter.

Details

If lambda is not specified, then it is estimated from the data. If there are categories with expected counts less than 5 or less than 1 a warning is shown.

Value

It returns a table with the contribution to the chi-square statistic for each category, the chi-square statistic, the degrees of freedom, and the p-value.

Author(s)

Raúl Eyzaguirre.

Examples

x <- 0:9
f <- c(6, 16, 48, 77, 72, 72, 46, 39, 15, 9)
chisq.pois(x, f)

reyzaguirre/rhep documentation built on Dec. 2, 2024, 4:22 p.m.