Mood’s median test compares the medians of two or more groups. It is often less powerful than the Mann–Whitney U test, but can be used when the spread of values in the groups are different due to outliers.
The test can be conducted with the mood.medtest function in the RVAideMemoire package.
• One-way data with two or more groups
• Dependent variable is ordinal, interval, or ratio
• Independent variable is a factor with levels indicating groups
• Observations between groups are independent. That is, not paired or repeated measures data
• Distributions of values for each group are similar in shape; however, the test is not sensitive to outliers
• Null hypothesis: The medians of values for each group are equal.
• Alternative hypothesis (two-sided): The medians of values for each group are not equal.
Significant results can be reported as “The median value of group A was significantly different from group B.”
The packages used in this chapter include:
The following commands will install these packages if they are not already installed:
This example uses the formula notation indicating that Likert is the dependent variable and Speaker is the independent variable. The data= option indicates the data frame that contains the variables. For the meaning of other options, see ?mood.medtest.
For appropriate plots and data frame checking, see the Two-sample Mann–Whitney U Test chapter.
Data = read.table(textConnection(Input),header=TRUE)
### Check the data frame
### Remove unnecessary objects
mood.medtest(Likert ~ Speaker,
data = Data)
Mood's median test
p-value = 0.001093