
Last chance! 50% off unlimited learning
Sale ends in
Conducts pairwise sign tests across groups for paired data.
pairwiseSignTest(formula = NULL, data = NULL, x = NULL, g = NULL,
method = "fdr", ...)
A formula indicating the measurement variable and the grouping variable. e.g. y ~ group.
The data frame to use.
The response variable as a vector.
The grouping variable as a vector.
The p-value adjustment method to use for multiple tests.
See p.adjust
.
Additional arguments passed to
SIGN.test
.
A dataframe of the groups being compared, the p-values, and the adjusted p-values.
The input should include either formula
and data
;
or x
, and g
.
The two sample paired sign test compares medians among two groups with paired data. See http://rcompanion.org/handbook/F_07.html for futher discussion of this test.
The pairwiseSignTest
function
can be used as a post-hoc method following an omnibus
Friedman test.
The function assumes that the data frame is already ordered by the blocking variable, so that the first observation of Group 1 is paired with the first observation of Group 2, and so on.
# NOT RUN {
data(BobBelcher)
BobBelcher = BobBelcher[order(BobBelcher$Instructor, BobBelcher$Rater),]
friedman.test(Likert ~ Instructor | Rater,
data = BobBelcher)
BobBelcher$Instructor = factor( BobBelcher$Instructor,
levels = c("Linda Belcher", "Louise Belcher",
"Tina Belcher", "Bob Belcher",
"Gene Belcher"))
PT = pairwiseSignTest(Likert ~ Instructor,
data = BobBelcher,
method = "fdr")
PT
cldList(comparison = PT$Comparison,
p.value = PT$p.adjust,
threshold = 0.05)
# }
Run the code above in your browser using DataLab