powered by
Statistical test for categorical variables Statistical test for categorical variables
my.chisq.test2(x, y, catMethod = 2, all = FALSE)
A numeric vector of length 1
a vector
An integer indicating methods for categorical variables. Possible values in methods are
Perform chisq.test first. If warning present, perform fisher test
Perform chisq.test without continuity correction
Perform chisq.test with continuity correction
perform fisher.test
perform prop.trend test
Default value is 2.
A logical
library(moonBook) x=acs$sex y=acs$Dx my.chisq.test2(x,y)
Run the code above in your browser using DataLab