Calculates Vargha and Delaney's A (VDA), Cliff's delta (CD), and r for several groups in a pairwise manner.
multiVDA(formula = NULL, data = NULL, x = NULL, g = NULL,
statistic = "VDA", digits = 3, ...)
A formula indicating the response variable and the independent variable. e.g. y ~ group.
The data frame to use.
If no formula is given, the response variable.
If no formula is given, the grouping variable.
One of "VDA"
, "CD"
, or "r"
.
This determines which statistic will be
evaluated to determine the comparison with the
most divergent groups.
The number of significant digits in the output.
Additional arguments passed to the wilcox.test
function.
A list containing a data frame of pairwise statistics, and the comparison with the most extreme value of the chosen statistic.
VDA and CD are effect size statistic appropriate in cases where a Wilcoxon-Mann-Whitney test might be used. Here, the pairwise approach would be used in cases where a Kruskal-Wallis test might be used. VDA ranges from 0 to 1, with 0.5 indicating stochastic equality, and 1 indicating that the first group dominates the second. CD ranges from -1 to 1, with 0 indicating stochastic equality, and 1 indicating that the first group dominates the second. r ranges from approximately, -0.86 to 0.86, depending on sample size, with 0 indicating no effect, and a positive result indicating that values in the first group are greater than in the second.
In the function output,
VDA.m
is the greater of VDA or 1-VDA.
CD.m
is the absolute value of CD.
r.m
is the absolute value of r.
The function calculates VDA and Cliff's delta from the "W"
U statistic from the
wilcox.test
function.
Specifically, VDA = U/(n1*n2); CD = (VDA-0.5)*2
.
For r, the Z value is extracted
from the wilcox_test
function in the
coin package. r is calculated as Z divided by
square root of the total observations.
The input should include either formula
and data
;
or var
, and group
.
Currently, the function makes no provisions for NA
values in the data. It is recommended that NA
s be removed
beforehand.
When the data in the first group are greater than in the second group, VDA is > 0.5, CD is positive, and r is positive. When the data in the second group are greater than in the first group, VDA is < 0.5, CD is negative, and r is negative. Be cautious with this interpretation, as R will alphabetize groups in the formula interface if the grouping variable is not already a factor.
# NOT RUN {
data(PoohPiglet)
multiVDA(Likert ~ Speaker, data=PoohPiglet)
# }
Run the code above in your browser using DataLab