| cliff_delta | R Documentation |
Compute Cliff's delta, a non-parametric effect size for the
difference between two groups. It is the standardized version of the
Mann-Whitney statistic and estimates the probability that a randomly drawn
value from one group exceeds a randomly drawn value from the other, minus
the reverse probability:
\delta = (\#\{x > y\} - \#\{x < y\}) / (n_1 n_2). It ranges from
-1 to 1 and, unlike the rank-biserial r, is unaffected
by ties beyond their contribution to the counts.
See the Datanovia tutorial Wilcoxon Test in R for a worked walkthrough.
cliff_delta(
data,
formula,
comparisons = NULL,
ref.group = NULL,
ci = FALSE,
conf.level = 0.95,
ci.type = "perc",
nboot = 1000,
...,
boot.parallel = getOption("boot.parallel", "no"),
boot.ncpus = getOption("boot.ncpus", 1L)
)
data |
a data frame containing the variables in the formula. |
formula |
a formula of the form |
comparisons |
A list of length-2 vectors specifying the groups of
interest to be compared. For example to compare groups "A" vs "B" and "B" vs
"C", the argument is as follow: |
ref.group |
a character string specifying the reference group. If specified, for a given grouping variable, each of the group levels will be compared to the reference group (i.e. control group). If |
ci |
if |
conf.level |
The level for the confidence interval. |
ci.type |
The type of confidence interval to use. Can be any of "norm",
"basic", "perc", or "bca". Passed to |
nboot |
The number of replications to use for bootstrap. |
... |
other arguments; accepted for interface compatibility with
|
boot.parallel |
The type of parallel operation to be used when computing
the bootstrap confidence interval. Allowed values are |
boot.ncpus |
Integer. The number of processes to be used in the parallel
bootstrap. Defaults to |
The magnitude thresholds are those of Romano et al. (2006):
|delta| < 0.147 "negligible", < 0.33 "small", < 0.474 "medium", otherwise
"large". Cliff's delta is algebraically identical to the rank-biserial
correlation, so the point estimate equals
effectsize::rank_biserial().
a tibble with one row per comparison and the columns .y.,
group1, group2, effsize (Cliff's delta), n1,
n2 and magnitude; conf.low / conf.high are added
when ci = TRUE.
Cliff, N. (1993). Dominance statistics: Ordinal analyses to answer ordinal questions. Psychological Bulletin, 114(3), 494-509.
Romano, J., Kromrey, J. D., Coraggio, J., & Skowronek, J. (2006). Appropriate statistics for ordinal level data. Annual meeting of the Florida Association of Institutional Research.
The Datanovia tutorial: Wilcoxon Test in R.
# Two-samples Cliff's delta
ToothGrowth %>% cliff_delta(len ~ supp)
# Pairwise comparisons
ToothGrowth %>% cliff_delta(len ~ dose)
# Grouped data
ToothGrowth %>%
dplyr::group_by(supp) %>%
cliff_delta(len ~ dose)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.