KW.multi.comp: Multiple pairwise comparison procedure to accompany a Kruskal-Wallis test
Description
As with ANOVA we can examine multiple pairwise comparisons from a Kruskal-Wallis test after we have rejected our omnibus null hypothesis. However we will need to account for the fact that these comparisons will be non-orthogonal. A conservative multiple comparison method used here is based on the Bonferroni procedure.
Usage
KW.multi.comp(Y, X, conf)
Arguments
Y
The response variable. A vector of quantitative responses.
X
An explanatory variable. A vector of factor levels.
conf
The level of desired confidence, 1 - P(type I error).
Value
Returns a six column dataframe containing:
1) the type of contrast (names are taken from levels in x),
2) the mean rank difference,
3) the lower confidence bound of the true mean rank difference,
4) the upper confidence bound of the true mean rank difference,
5) the hypothesis decision rule given the prescribed significance level,
6) the adjusted p-value.
References
Kutner, M. H., Nachtsheim, C. J., Neter, J., and W. Li (2005) Applied linear statistical models, 5th edition. McGraw-Hill, Boston.