Cohen's Effect Size
Computes the Cohen's d and Hedges'g effect size statistics.
CohenD(x, y = NULL, pooled = TRUE, correct = FALSE, conf.level = NA, na.rm = FALSE)
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. |
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 |
Andri Signorell <andri@signorell.net>
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
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.