chi2.test | R Documentation |
Goodnes of fit test for two distributions: Poisson, binomial and negative binomial.
chi2.test(x, dist = "pois", lambda = 1)
x |
a numeric vector of values. |
dist |
names distributions: pois (deflaut), binom or nbinom |
lambda |
parameter lambda test Cressie-Read. |
An object of class "htest" containing the following components:
estimates distribution parameters and loglik
the degrees of freedom and lambda parameter
statistic test value
p-value
Krzysztof Trajkowski
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.
goodfit
set.seed(2305)
g <- rpois(120,3)
chi2.test(g)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.