cgf.test: The Cressie-Read test for contingency table.

View source: R/cgf.test.R

cgf.testR Documentation

The Cressie-Read test for contingency table.

Description

Calculates statistics X-squared, G-squared, F-squared for contingency table.

Usage

cgf.test(x, test="pc")

Arguments

x

contingency table.

test

"gw","g", "p", "n", "ft", "kl"

Value

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

parameter

the degrees of freedom

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

assocstats

Examples

m <- matrix(c(23,32,45,26),2,2)

# LR test with correction:
cgf.test(m, test="gw")

# LR test without correction:
cgf.test(m, test="g")

# test Pearson:
cgf.test(m, test="p")

# test Pearson with correction:
cgf.test(m)


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