mwu | R Documentation |
This function performs a Mann-Whitney-U-Test (or Wilcoxon rank sum test,
see wilcox.test
and wilcox_test
)
for x
, for each group indicated by grp
. If grp
has more than two categories, a comparison between each combination of
two groups is performed.
The function reports U, p and Z-values as well as effect size r
and group-rank-means.
mwu( data, x, grp, distribution = "asymptotic", out = c("txt", "viewer", "browser"), encoding = "UTF-8", file = NULL ) mannwhitney( data, x, grp, distribution = "asymptotic", out = c("txt", "viewer", "browser"), encoding = "UTF-8", file = NULL )
data |
A data frame. |
x |
Bare (unquoted) variable name, or a character vector with the variable name. |
grp |
Bare (unquoted) name of the cross-classifying variable, where
|
distribution |
Indicates how the null distribution of the test statistic should be computed.
May be one of |
out |
Character vector, indicating whether the results should be printed
to console ( |
encoding |
Character vector, indicating the charset encoding used
for variable and value labels. Default is |
file |
Destination file, if the output should be saved as file.
Only used when |
(Invisibly) returns a data frame with U, p and Z-values for each group-comparison as well as effect-size r; additionally, group-labels and groups' n's are also included.
This function calls the wilcox_test
with formula. If grp
has more than two groups, additionally a Kruskal-Wallis-Test (see kruskal.test
)
is performed.
Interpretation of effect sizes, as a rule-of-thumb:
small effect >= 0.1
medium effect >= 0.3
large effect >= 0.5
data(efc) # Mann-Whitney-U-Tests for elder's age by elder's dependency. mwu(efc, e17age, e42dep)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.