Learn R Programming

effectsize (version 0.8.3)

d_to_r: Convert Between d, r, and Odds Ratio

Description

Enables a conversion between different indices of effect size, such as standardized difference (Cohen's d), (point-biserial) correlation r or (log) odds ratios.

Usage

d_to_r(d, n1, n2, ...)

r_to_d(r, n1, n2, ...)

oddsratio_to_d(OR, log = FALSE, ...)

logoddsratio_to_d(OR, log = TRUE, ...)

d_to_oddsratio(d, log = FALSE, ...)

oddsratio_to_r(OR, n1, n2, log = FALSE, ...)

logoddsratio_to_r(OR, log = TRUE, ...)

r_to_oddsratio(r, n1, n2, log = FALSE, ...)

Value

Converted index.

Arguments

d

Standardized difference value (Cohen's d).

n1, n2

Group sample sizes. If either is missing, groups are assumed to be of equal size.

...

Arguments passed to or from other methods.

r

Correlation coefficient r.

OR

Odds ratio values in vector or data frame.

log

Take in or output the log of the ratio (such as in logistic models).

Details

Conversions between d and OR is done through these formulae:

  • \(d = \frac{\log(OR)\times\sqrt{3}}{\pi}\)

  • \(log(OR) = d * \frac{\pi}{\sqrt(3)}\)

Converting between d and r is done through these formulae:

  • \(d = \frac{\sqrt{h} * r}{\sqrt{1 - r^2}}\)

  • \(r = \frac{d}{\sqrt{d^2 + h}}\)

Where \(h = \frac{n_1 + n_2 - 2}{n_1} + \frac{n_1 + n_2 - 2}{n_2}\). When groups are of equal size, h reduces to approximately 4. The resulting r is also called the binomial effect size display (BESD; Rosenthal et al., 1982).

References

  • Borenstein, M., Hedges, L. V., Higgins, J. P. T., & Rothstein, H. R. (2009). Converting among effect sizes. Introduction to meta-analysis, 45-49.

  • Jacobs, P., & Viechtbauer, W. (2017). Estimation of the biserial correlation and its sampling variance for use in meta‐analysis. Research synthesis methods, 8(2), 161-180. tools:::Rd_expr_doi("10.1002/jrsm.1218")

  • Rosenthal, R., & Rubin, D. B. (1982). A simple, general purpose display of magnitude of experimental effect. Journal of educational psychology, 74(2), 166.

  • Sánchez-Meca, J., Marín-Martínez, F., & Chacón-Moscoso, S. (2003). Effect-size indices for dichotomized outcomes in meta-analysis. Psychological methods, 8(4), 448.

See Also

cohens_d()

Other convert between effect sizes: diff_to_cles, eta2_to_f2(), odds_to_probs(), oddsratio_to_riskratio()

Examples

Run this code
r_to_d(0.5)
d_to_oddsratio(1.154701)
oddsratio_to_r(8.120534)

d_to_r(1)
r_to_oddsratio(0.4472136, log = TRUE)
oddsratio_to_d(1.813799, log = TRUE)

Run the code above in your browser using DataLab