Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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), correlation r or (log) odds ratios.

Usage

d_to_r(d, ...)

r_to_d(r, ...)

convert_d_to_r(d, ...)

convert_r_to_d(r, ...)

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

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

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

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

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

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

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

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

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

convert_r_to_oddsratio(r, log = FALSE, ...)

Arguments

d

Standardized difference value (Cohen's d).

...

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 OR and r is done through these formulae.

  • d to r: d = \frac{2 * r}{√{1 - r^2}}

  • r to d: r = \frac{d}{√{d^2 + 4}}

  • OR to d: d = \frac{\log(OR)\times√{3}}{π}

  • d to OR: log(OR) = d * \frac{π}{√(3)}

The conversion from d to r assumes equally sized groups. The resulting r is also called the binomial effect size display (BESD; Rosenthal et al., 1982).

Value

Converted index.

References

  • 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.

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

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

See Also

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

Examples

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)

effectsize

Indices of Effect Size and Standardized Parameters

v0.4.4-1
GPL-3
Authors
Mattan S. Ben-Shachar [aut, cre] (<https://orcid.org/0000-0002-4287-4801>), Dominique Makowski [aut] (<https://orcid.org/0000-0001-5375-9967>), Daniel Lüdecke [aut] (<https://orcid.org/0000-0002-8895-3206>), Indrajeet Patil [ctb] (<https://orcid.org/0000-0003-1995-6531>, @patilindrajeets), Ken Kelley [ctb], David Stanley [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.