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

View source: R/cr.test.R

cr.testR Documentation

The Cressie-Read test for contingency table.

Description

Computes D-squared Cressie-Read test for contingency table and contingency coefficient: Q_Yulea, Phi, C-Pearson, C_adj, V-Cramer, T-Tschuprow for 2x2 table or C-Pearson, C_adj, V-Cramer, T-Tschuprow for rxc table where r>2 or c>0.

Usage

cr.test(x, lambda=2/3)

Arguments

x

contingency table.

lambda

lambda parameter lambda test Cressie-Read.

Value

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

estimate

estimates contingency coefficient

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

chisq.test fisher.test

Examples

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

# Cressie-Read:
cr.test(m)

# Pearson:
cr.test(m,lambda=1)

# Likelihood Ratio:
cr.test(m,lambda=1e-05)

# Freeman-Tukey's:
cr.test(m,lambda=-1/2)

# Neyman's:
cr.test(m,lambda=-2)

# Kullback-Leibler:
cr.test(m,lambda=-0.99999)

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