# NOT RUN {
## Hollander & Wolfe (1973), 116.
## Mucociliary efficiency from the rate of removal of dust in normal
## subjects, subjects with obstructive airway disease, and subjects
## with asbestosis.
x <- c(2.9, 3.0, 2.5, 2.6, 3.2) # normal subjects
y <- c(3.8, 2.7, 4.0, 2.4) # with obstructive airway disease
z <- c(2.8, 3.4, 3.7, 2.2, 2.0) # with asbestosis
g <- factor(x = c(rep(1, length(x)),
rep(2, length(y)),
rep(3, length(z))),
labels = c("ns", "oad", "a"))
dat <- data.frame(
g = g,
x = c(x, y, z))
## AD-Test
adKSampleTest(x ~ g, data = dat)
## BWS-Test
bwsKSampleTest(x ~ g, data = dat)
## Kruskal-Test
## Using incomplete beta approximation
kruskalTest(x ~ g, dat, dist="KruskalWallis")
## Using chisquare distribution
kruskalTest(x ~ g, dat, dist="Chisquare")
# }
# NOT RUN {
## Check with kruskal.test from R stats
kruskal.test(x ~ g, dat)
# }
# NOT RUN {
## Using Conover's F
kruskalTest(x ~ g, dat, dist="FDist")
# }
# NOT RUN {
## Check with aov on ranks
anova(aov(rank(x) ~ g, dat))
## Check with oneway.test
oneway.test(rank(x) ~ g, dat, var.equal = TRUE)
# }
Run the code above in your browser using DataLab