Skip to contents

cohens_u3(), p_superiority(), and p_overlap() give only one of the CLESs.

## Usage

cles(
x,
y = NULL,
data = NULL,
mu = 0,
ci = 0.95,
alternative = "two.sided",
parametric = TRUE,
verbose = TRUE,
iterations = 200,
...
)

common_language(
x,
y = NULL,
data = NULL,
mu = 0,
ci = 0.95,
alternative = "two.sided",
parametric = TRUE,
verbose = TRUE,
iterations = 200,
...
)

cohens_u3(...)

p_superiority(...)

p_overlap(...)

## Arguments

x

A formula, a numeric vector, or a character name of one in data.

y

A numeric vector, a grouping (character / factor) vector, a or a character name of one in data. Ignored if x is a formula.

data

An optional data frame containing the variables.

mu

a number indicating the true value of the mean (or difference in means if you are performing a two sample test).

ci

Confidence Interval (CI) level

alternative

a character string specifying the alternative hypothesis; Controls the type of CI returned: "two.sided" (default, two-sided CI), "greater" or "less" (one-sided CI). Partial matching is allowed (e.g., "g", "l", "two"...). See One-Sided CIs in effectsize_CIs.

parametric

Use parametric estimation (see cohens_d()) or non-parametric estimation (see rank_biserial()).

verbose

Toggle warnings and messages on or off.

iterations

The number of bootstrap replicates for computing confidence intervals. Only applies when ci is not NULL and parametric = FALSE.

...

Arguments passed to or from other methods. When x is a formula, these can be subset and na.action.

## Value

A data frame containing the common language effect sizes (and optionally their CIs).

## Details

These measures of effect size present group differences in probabilistic terms:

• Probability of superiority is the probability that, when sampling an observation from each of the groups at random, that the observation from the second group will be larger than the sample from the first group.

• Cohen's U3 is the proportion of the second group that is smaller than the median of the first group.

• Overlap (OVL) is the proportional overlap between the distributions. (When parametric = FALSE, bayestestR::overlap() is used.)

For unequal group sizes, it is recommended to use the non-parametric based CLES (parametric = FALSE).

## Confidence Intervals (CIs)

For parametric CLES, the CIs are transformed CIs for Cohen's d (d_to_cles()). For non-parametric (parametric = FALSE) CLES, the CI of Pr(superiority) is a transformed CI of the rank-biserial correlation (rb_to_cles()), while for Cohen's U3 and the Overlap coefficient the confidence intervals are bootstrapped (requires the boot package).

## References

• Cohen, J. (1977). Statistical power analysis for the behavioral sciences. New York: Routledge.

• Reiser, B., & Faraggi, D. (1999). Confidence intervals for the overlapping coefficient: the normal equal variance case. Journal of the Royal Statistical Society, 48(3), 413-418.

• Ruscio, J. (2008). A probability-based measure of effect size: robustness to base rates and other factors. Psychological methods, 13(1), 19–30.

## See also

d_to_cles() sd_pooled()

Other effect size indices: cohens_d(), effectsize.BFBayesFactor(), eta_squared(), phi(), rank_biserial()

## Examples

cles(mpg ~ am, data = mtcars)
#> Parameter       | Coefficient |       95% CI
#> --------------------------------------------
#> Pr(superiority) |        0.15 | [0.05, 0.32]
#> Cohen's U3      |        0.07 | [0.01, 0.25]
#> Overlap         |        0.46 | [0.26, 0.74]

set.seed(4)
cles(mpg ~ am, data = mtcars, parametric = FALSE)
#> Parameter       | Coefficient |       95% CI
#> --------------------------------------------
#> Pr(superiority) |        0.17 | [0.08, 0.32]
#> Cohen's U3      |        0.15 | [0.00, 0.36]
#> Overlap         |        0.69 | [0.32, 0.94]
#>
#> - Non-parametric CLES

if (FALSE) {
## Individual CLES
p_superiority(extra ~ group, data = sleep)

cohens_u3(extra ~ group, data = sleep, parametric = FALSE)

p_overlap(extra ~ group, data = sleep)
}