moods.test | R Documentation |
A nonparametric test used to test the equality of medians from two or more populations.
moods.test(X, ..., exact = TRUE)
X |
a list of two or more numeric vectors |
... |
additional parameters passed to |
exact |
logical; if |
Mood's median test is an exact test which dichotomizes values in each group above or below the median of the pooled data. The test is conservative in small sample sizes.
Note that this test is different than mood.test
in the stats
package which tests for a difference in scale parameters rather than
medians.
mood.test
; fisher.test
;
chisq.test
; kruskal.test
;
wilcox.test
set.seed(1)
X <- list(rnorm(10), rnorm(10, 1), rnorm(20, 2))
moods.test(X)
moods.test(X[1:2], exact = FALSE, correct = TRUE)
plot(density(X[[1]]), xlim = range(unlist(X)), ylim = c(0, .5), main = '')
for (x in 2:3)
lines(density(X[[x]]), col = x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.