chisq.test: Chi-square and Pearson Chi-square Test

Description Usage Arguments Value Examples

Description

Produces the expected and the chi-square value for each cell in the contingency table.

Usage

1

Arguments

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.

Value

A list with class "htest" outputting the corresponding expected and chi- square values.

Examples

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

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.