Pairwise two-sample symmetry tests with matrix output
Pairwise two-sample symmetry tests with matrix output
Conducts pairwise two-sample symmetry tests across groups.
pairwisePermutationSymmetryMatrix( formula =NULL, data =NULL, x =NULL, g =NULL, b =NULL, method ="fdr",...)
Arguments
formula: A formula indicating the measurement variable and the grouping variable. e.g. y ~ group.
data: The data frame to use.
x: The response variable as a vector.
g: The grouping variable as a vector.
b: The blocking variable as a vector.
method: The p-value adjustment method to use for multiple tests. See stats::p.adjust.
...: Additional arguments passed to coin::symmetry_test.
Returns
A list consisting of: A matrix of p-values; the p-value adjustment method; a matrix of adjusted p-values.
Details
The input should include either formula and data; or x, g, and b.
This function is a wrapper for coin::symmetry_test, passing pairwise groups to the function. It's critical to read and understand the documentation for this function to understand its use and options.
Note
The parsing of the formula is simplistic. The first variable on the left side is used as the measurement variable. The first variable on the right side is used for the grouping variable. The second variable on the right side is used for the blocking variable.