
Conducts groupwise tests of association on a three-way contingency table.
groupwiseCMH(x, group = 3, fisher = TRUE, gtest = FALSE, chisq = FALSE,
method = "fdr", correct = "none", digits = 3, ...)
A three-way contingency table.
The dimension of the table to use as the grouping variable.
Will be 1
, 2
, or 3
.
If TRUE
, conducts Fisher exact test.
If TRUE
, conducts G test of association.
If TRUE
, conducts Chi-square test of association.
The method to use to adjust p-values. See ?p.adjust
.
The correction to apply to the G test.
See GTest
.
The number of digits for numbers in the output.
Other arguments passed to chisq.test
or GTest
.
A data frame of groups, test used, p-values, and adjusted p-values.
If more than one of fisher
, gtest
, or chisq
is
set to TRUE
, only one type of test of association
will be conducted.
nominalSymmetryTest
, pairwiseMcnemar
,
pairwiseNominalIndependence
,
pairwiseNominalMatrix
# NOT RUN {
### Post-hoc for Cochran-Mantel-Haenszel test
data(AndersonBias)
Table = xtabs(Count ~ Sex + Result + County,
data=AndersonBias)
ftable(Table)
mantelhaen.test(Table)
groupwiseCMH(Table,
group = 3,
fisher = TRUE,
gtest = FALSE,
chisq = FALSE,
method = "fdr",
correct = "none",
digits = 3)
# }
Run the code above in your browser using DataLab