CohenD: Cohen's Effect Size

Description Usage Arguments Value Author(s) References See Also Examples

Description

Computes the Cohen's d and Hedges'g effect size statistics.

Usage

1
CohenD(x, y = NULL, pooled = TRUE, correct = FALSE, conf.level = NA, na.rm = FALSE)

Arguments

x

a (non-empty) numeric vector of data values.

y

a (non-empty) numeric vector of data values.

pooled

logical, indicating whether compute pooled standard deviation or the whole sample standard deviation. Default is TRUE.

correct

logical, indicating whether to apply the Hedges correction. (Default: FALSE)

conf.level

confidence level of the interval. Set this to NA, if no confidence intervals should be calculated. (This is the default)

na.rm

logical. Should missing values be removed? Defaults to FALSE.

Value

a numeric vector with 3 elements:

d

the effect size d

lwr.ci

lower bound of the confidence interval

upr.ci

upper bound of the confidence interval

Author(s)

Andri Signorell <andri@signorell.net>

References

Cohen, J. (1988) Statistical power analysis for the behavioral sciences (2nd ed.) Academic Press, New York.

Hedges, L. V. & Olkin, I. (1985) Statistical methods for meta-analysis Academic Press, Orlando, FL

Smithson, M.J. (2003) Confidence Intervals, Quantitative Applications in the Social Sciences Series, No. 140. Thousand Oaks, CA: Sage. pp. 39-41

See Also

mean, var

Examples

1
2
3
4
x <- d.pizza$price[d.pizza$driver=="Carter"]
y <- d.pizza$price[d.pizza$driver=="Miller"]

CohenD(x, y, conf.level=0.95, na.rm=TRUE)

AndriSignorell/DescTools documentation built on April 8, 2021, 5:51 a.m.