Compute different indices of effect size. For very small sample sizes (n < 20) Hedges' g is considered as less biased than Cohen's d. For sample sizes > 20, the results for both statistics are roughly equivalent.
The Glass<U+2019>s delta is appropriate if standard deviations are significantly different between groups, as it uses only the second group's standard deviation.
cohens_d(
x,
y = NULL,
data = NULL,
correction = FALSE,
pooled_sd = TRUE,
paired = FALSE,
ci = 0.95
)hedges_g(
x,
y = NULL,
data = NULL,
correction = FALSE,
pooled_sd = TRUE,
paired = FALSE,
ci = 0.95
)
glass_delta(x, y = NULL, data = NULL, correction = FALSE, ci = 0.95)
A formula, a numeric vector, or a character name of one in data
.
A numeric vector, a grouping (character / factor) vector, a or a character name of one in data
. Ignored if x
is a formula.
An optional data frame containing the variables.
If TRUE
, applies a correction to make it less biased for small samples (McGrath & Meyer, 2006).
If TRUE
(default), a sd_pooled()
is used (assuming equal variance). Else the mean SD from both groups is used instead.
If TRUE
, the values of x
and y
are considered as paired.
Confidence Interval (CI) level
A data frame with the effect size(s) and confidence interval(s).
Confidence intervals are estimated using the Noncentrality parameter method;
These methods searches for a the best ncp
(non-central parameters) for
of the noncentral t distribution for the desired tail-probabilities,
and then convert these ncp
s to the corresponding effect sizes.
Cohen, J. (2013). Statistical power analysis for the behavioral sciences. Routledge.
McGrath, R. E., & Meyer, G. J. (2006). When effect sizes disagree: the case of r and d. Psychological methods, 11(4), 386.
Hedges, L. V. & Olkin, I. (1985). Statistical methods for meta-analysis. Orlando, FL: Academic Press.
# NOT RUN {
cohens_d(iris$Sepal.Length, iris$Sepal.Width)
hedges_g("Sepal.Length", "Sepal.Width", data = iris)
cohens_d(mpg ~ am, data = mtcars)
cohens_d(mpg ~ am, data = mtcars, pooled_sd = FALSE)
hedges_g(mpg ~ am, data = mtcars)
glass_delta(mpg ~ am, data = mtcars)
# }
Run the code above in your browser using DataLab