groupwiseCMH | R Documentation |
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,
...
)
x |
A three-way contingency table. |
group |
The dimension of the table to use as the grouping variable.
Will be |
fisher |
If |
gtest |
If |
chisq |
If |
method |
The method to use to adjust p-values. See |
correct |
The correction to apply to the G test.
See |
digits |
The number of digits for numbers in the output. |
... |
Other arguments passed to |
If more than one of fisher
, gtest
, or chisq
is
set to TRUE
, only one type of test of association
will be conducted.
A data frame of groups, test used, p-values, and adjusted p-values.
Salvatore Mangiafico, mangiafico@njaes.rutgers.edu
https://rcompanion.org/handbook/H_06.html
nominalSymmetryTest
,
pairwiseMcnemar
,
pairwiseNominalIndependence
,
pairwiseNominalMatrix
### Post-hoc for Cochran-Mantel-Haenszel test
data(AndersonBias)
Table = xtabs(Count ~ Gender + 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.