Compute Effect Sizes in R
This package provides a comprehensive set of tools/functions to easily derive and/or convert statistics generated from one's study (or from those reported in a published study) to all of the common effect size estimates, along with their variances, confidence intervals, and p-values. Several additional statistics are generated, including NNT (number needed to treat), U3 (Cohen's U3 distribution overlap statistic), CLES (Common Language Effect Size) and Cliff's Delta (success rate difference). The
compute.es package's functions will convert a variety of statistics, such as means and standard deviations, t-test or p-value and sample size, to estimates of:
|(1) Cohen's d (mean difference)|
|(2) Hedges' g (unbiased estimate of d)|
|(3) r (correlation coefficient)|
|(4) z' (Fisher's z)|
|(5) log odds ratio|
|(6) the variances, confidence intervals and p-values of the above estimates|
|(7) Other statistics: NNT, U3, CLES, Cliff's Delta|
The functions in this package can compute the effect sizes from a single study or from multiple studies simultaneously. The
compute.es package uses recommended conversion formulas as described in The Handbook of Research Synthesis and Meta-Analysis (Cooper, Hedges, & Valentine, 2009).
Structure of Functions
The function names for this package are designed for quick processing, such that the first part of the function corresponds to the input method (statistical information reported in the study) and the remaining part corresponds to the output values, which are the effect size estimates ('es' at the end of each function). For example, the function
des() has the input of a Cohen's d and will output various effect size ('es') estimates.
The other function inputs and names are as follows:
|ANCOVA means (pooled sd):||
|Chi-squared (1 df):||
|Failure group (binary):||
|Log odds ratio:||
|Means (pooled sd):||
AC Del Re with contributions from Jeffrey C. Valentine
Maintainer: AC Del Re email@example.com
Borenstein (2009). Effect sizes for continuous data. In H. Cooper, L. V. Hedges, & J. C. Valentine (Eds.), The handbook of research synthesis and meta analysis (pp. 279-293). New York: Russell Sage Foundation.
Cooper, H., Hedges, L.V., & Valentine, J.C. (2009). The handbook of research synthesis and meta-analysis (2nd edition). New York: Russell Sage Foundation.
Furukawa, T. A., & Leucht, S. (2011). How to obtain NNT from Cohen's d: comparison of two methods. PloS one, 6(4), e19070.
McGraw, K. O. & Wong, S. P. (1992). A common language effect size statistic. Psychological Bulletin, 111, 361-365.
Valentine, J. C. & Cooper, H. (2003). Effect size substantive interpretation guidelines: Issues in the interpretation of effect sizes. Washington, DC: What Works Clearinghouse.
For information and user-friendly R packages to conduct a meta-analysis see:
Menu-Driven Meta-Analysis (Graphical User Interface):
RcmdrPlugin.MA package: http://CRAN.R-project.org/package=RcmdrPlugin.MA
Meta-Analysis with Correlations:
MAc package: http://CRAN.R-project.org/package=MAc
Meta-Analysis with Mean Differences:
MAd package: http://CRAN.R-project.org/package=MAd
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
## 1. Computations to Calculate Effect Sizes: # For example, suppose the primary study reported a t-test # value for differences between 2 groups. Then, running: tes(t=1.74, n.1=30, n.2=31) # Or, more simply: tes(1.74, 30, 31) # where the reported t-value = 1.74, treatment sample # size = 30, and the control/comparison sample size = 31 will # output effect sizes of d, g, r, z, OR, and log odds ratio. # The variances, confidence intervals, p-values and other # statistics will also be computed. # Note: If only the total sample size is reported simply split # the number in half for entry into the function. # Now suppose one has a dataset (i.e., data.frame in R-speak) # with several t-values to be converted into effect sizes: # First, we will generate sample data: dat <- data.frame(id=1:5,t=rnorm(5, 2, .5), n.t=round(rnorm(5, 25),0), n.c=round(rnorm(5, 25),0)) # Running the fuction as follows will generate a new # data.frame with several effect size estimates tes(t=t, n.1=n.t, n.2=n.c, level=95, dig=2, id=id, data=dat)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.