Learn R Programming

pgirmess (version 1.3.8)

kruskalmc: Multiple comparison test after Kruskal-Wallis

Description

Multiple comparison test between treatments or treatments versus control after Kruskal-Wallis test

Usage

kruskalmc(resp, categ, probs = 0.05, cont=NULL)

Arguments

resp
a numeric vector of data values
categ
a factor object giving the group for the corresponding elements of 'x'
probs
a probability for the critical difference
cont
NULL (default) for multiple comparison between treatments; 'one-tailed' or 'two-tailed' for corresponding multiple comparisons treatments versus control; partial matching allowed

Value

  • A list of class 'mc' with the following items:
  • statisticstatistics used
  • p.valuethe p value of the critical difference
  • dif.coma data.frame with observed and critical differences

Details

When the obtained value of a Kruskal-Wallis test is significant, it indicates that at least one of the groups is different from at least one of the others. This test help determining which groups are different with pairwise comparisons adjusted appropriately. Those pairs of groups which have observed differences higher than a critical value are considered statistically different at the given probability (p level). Three type of multiple comparisons are implemented: comparisons between treatments, 'one-tailed' and 'two-tailed' comparison treatments versus control. The first factor level is considered the control.

References

Siegel and Castellan (1988) Non parametric statistics for the behavioural sciences. MacGraw Hill Int., New York. pp 213-214

See Also

kruskal.test, to reorder factor levels see relevel

Examples

Run this code
resp<-c(0.44,0.44,0.54,0.32,0.21,0.28,0.7,0.77,0.48,0.64,0.71,0.75,0.8,0.76,0.34,0.80,0.73,0.8)
categ<-as.factor(rep(c("A","B","C"),times=1,each=6))
kruskalmc(resp, categ)
kruskalmc(resp, categ, probs=0.01)
kruskalmc(resp, categ, cont="one-tailed")
kruskalmc(resp, categ, cont="two-tailed")

Run the code above in your browser using DataLab