chi2.test: The Cressie-Read test for discrete data.

View source: R/chi2.test.R

chi2.testR Documentation

The Cressie-Read test for discrete data.

Description

Goodnes of fit test for two distributions: Poisson, binomial and negative binomial.

Usage

chi2.test(x, dist = "pois", lambda = 1)

Arguments

x

a numeric vector of values.

dist

names distributions: pois (deflaut), binom or nbinom

lambda

parameter lambda test Cressie-Read.

Value

An object of class "htest" containing the following components:

estimate

estimates distribution parameters and loglik

parameter

the degrees of freedom and lambda parameter

statistic

statistic test value

p.value

p-value

Author(s)

Krzysztof Trajkowski

References

Noel Cressie and Timothy R. C. Read (1984). Multinomial Goodness-of-Fit Test. Journal of the Royal Statistical Society. Series B (Methodological), Vol. 46, No. 3 (1984), 440-464.

See Also

goodfit

Examples

set.seed(2305)
g <- rpois(120,3)
chi2.test(g)


krzysiektr/CressieReadTest documentation built on April 3, 2024, 11:01 p.m.