Converts \(d\) (mean difference) to an effect size of \(g\) (unbiased estimate of \(d\)), \(r\) (correlation coefficient), \(z'\) (Fisher's \(z\)), and log odds ratio. The variances, confidence intervals and p-values of these estimates are also computed, along with NNT (number needed to treat), U3 (Cohen's \(U_(3)\) overlapping proportions of distributions), CLES (Common Language Effect Size) and Cliff's Delta.
des(d, n.1, n.2, level = 95, cer = 0.2, dig = 2, verbose = TRUE, id=NULL, data=NULL)
Mean difference statistic (\(d\)).
Sample size of group one.
Sample size of group one.
Confidence level. Default is 95%
.
Control group Event Rate (e.g., proportion of cases showing recovery). Default is 0.2
(=20% of cases showing recovery). CER is used exclusively for NNT output. This argument can be ignored if input is not a mean difference effect size. Note: NNT output (described below) will NOT be meaningful if based on anything other than input from mean difference effect sizes (i.e., input of Cohen's d, Hedges' g will produce meaningful output, while correlation coefficient input will NOT produce meaningful NNT output).
Number of digits to display. Default is 2
digits.
Print output from scalar values? If yes, then verbose=TRUE; otherwise, verbose=FALSE. Default is TRUE.
Study identifier. Default is NULL
, assuming a scalar is used as input. If input is a vector dataset (i.e., data.frame
, with multiple values to be computed), enter the name of the study identifier here.
name of data.frame
. Default is NULL
, assuming a scalar is used as input. If input is a vector dataset (i.e., data.frame
, with multiple values to be computed), enter the name of the data.frame
here.
Standardized mean difference (\(d\)).
Variance of \(d\).
lower confidence limits for \(d\).
upper confidence limits for \(d\).
Cohen's \(U_(3)\), for \(d\).
Common Language Effect Size for \(d\).
Cliff's Delta for \(d\).
p-value for \(d\).
Unbiased estimate of \(d\).
Variance of \(g\).
lower confidence limits for \(g\).
upper confidence limits for \(g\).
Cohen's \(U_(3)\), for \(g\).
Common Language Effect Size for \(g\).
p-value for \(g\).
Correlation coefficient.
Variance of \(r\).
lower confidence limits for \(r\).
upper confidence limits for \(r\).
p-value for \(r\).
Fisher's z (\(z'\)).
Variance of \(z'\).
lower confidence limits for \(z'\).
upper confidence limits for \(z'\).
p-value for \(z'\).
Odds ratio.
lower confidence limits for \(OR\).
upper confidence limits for \(OR\).
p-value for \(OR\).
Log odds ratio.
Variance of log odds ratio.
lower confidence limits for \(lOR\).
upper confidence limits for \(lOR\).
p-value for \(lOR\).
Total sample size.
Number needed to treat.
Information regarding input (d):
In a study comparing means from independent groups, the population standardized mean difference is defined as
$$\delta=% \frac{\mu_{2}-\mu_{1}}% {\sigma}$$
where \(\mu_{2}\) is the population mean of the second group, \(\mu_{1}\) is the population mean of the first group, and \(\sigma\) is the population standard deviation (assuming \(\sigma_{2}\) = \(\sigma_{1}\)).
The estimate of \(\delta\) from independent groups is defined as
$$d=% \frac{\bar Y_{2}-\bar Y_{1}}% {S_{within}}$$ where \(\bar Y_{2}\) and \(\bar Y_{1}\) are the sample means in each group and \(S_{within}\) is the standard deviation pooled across both groups and is defined as
$$S_{within}=% \sqrt{\frac{(n_{1}-1)S^2_{1}+(n_{2}-1)S^2_{2}}% {n_{1}+n_{2}-2}}$$
where \(n_{1}\) and \(n_{2}\) are the sample sizes of group 1 and 2 respectively and \(S^2_{1}\) and \(S^2_{2}\) are the standard deviations of each group. The variance of \(d\) is then defined as
$$v_{d}=% \frac{n_{1}+n_{2}}% {n_{1}n_{2}}+% \frac{d^2}% {2(n_{1}n_{2})}$$
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.
Cohen, J. (1988). Statistical power for the behavioral sciences (2nd ed.). Hillsdale, NJ: Erlbaum.
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.
# NOT RUN {
# CALCULATE SEVERAL EFFECT SIZES BASED ON d STATISTIC:
library(compute.es)
args(des) # d STAT TO OTHER ES (INCLUDING HEDGES g)
# SCALAR
des(d=0.8, n.1=30, n.2=30)
## VECTOR OF d VALUES
# SAMPLE DATA
dat <- data.frame(id=1:30,
d=rnorm(30, 0.8, 0.1),
nT=round(rnorm(30, 30, 5), 0),
nC=round(rnorm(30, 30, 5), 0)
)
des(d=d, n.1=nT, n.2=nC, id=id, data=dat)
# TO EXTRACT JUST g AND var(g)
des(d=d, n.1=nT, n.2=nC, id=id, data=dat)[,13:14]
# }
Run the code above in your browser using DataLab