Description Usage Arguments Value Examples
Produces the expected and the chi-square value for each cell in the contingency table.
1 | chisq.test(x, ...)
|
x |
FLMatrix |
pear |
The values is 1 if wanna perform pearson chi-square test. Otherwise, by default it's 0 and perform chi- square test. |
A list with class "htest" outputting the corresponding expected and chi- square values.
1 2 3 4 5 6 7 8 9 | mat <- rbind(c(762, 327, 468), c(484, 239, 477))
dimnames(mat) <- list(gender = c("F", "M"),
party = c("Democrat","Independent", "Republican"))
FLmat <- as.FL(mat)
chisq.test(FLmat)
## by default pear=0
## performs chi-square test
chisq.test(FLmat,pear=1)
## performs Pearson chi- square test
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.