cgf.test | R Documentation |
Calculates statistics X-squared, G-squared, F-squared for contingency table.
cgf.test(x, test="pc")
x |
contingency table. |
test |
"gw","g", "p", "n", "ft", "kl" |
An object of class "htest" containing the following components:
the degrees of freedom
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.
assocstats
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.