asbio (version 1.9-7)

pairw.kw: Multiple pairwise comparison procedure to accompany a Kruskal-Wallis test

Description

Replaces the defunct KW.multi.comp. 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 inequality.

Usage

pairw.kw(y, x, conf)

Value

Returns a list of class = "pairw". The utility print function returns a descriptive head and a six column summary 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 given the prescribed significance level,

6) the adjusted P-value.

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).

Author

Ken Aho and Richard Boyce. Richard provided an adjustment for ties. Thanks to Paule Bodson-Clermont for pointing out issues with the default behaviour of rank, leading to incorrect answers from pair.kw given missing vaues.

References

Kutner, M. H., Nachtsheim, C. J., Neter, J., and W. Li (2005) Applied Linear Statistical Models, 5th edition. McGraw-Hill, Boston.

See Also

pairw.anova, pairw.fried, plot.pairw

Examples

Run this code
rye.data <- data.frame(rye = c(50, 49.8, 52.3, 44.5, 62.3, 74.8, 72.5, 80.2, 
47.6, 39.5, 47.7,50.7), nutrient = factor(c(rep(1, 4), rep(2, 4), rep(3, 4))))
kw <- with(rye.data, pairw.kw(y = rye, x = nutrient, conf = .95))
kw
plot(kw, loc.meas = median, int = "IQR")
# you can also try: plot(kw, type = 2)

Run the code above in your browser using DataCamp Workspace