d_to_r {effectsize}R Documentation

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(logOR, log = TRUE, ...)

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

d_to_logoddsratio(d, log = TRUE, ...)

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

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

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

r_to_logoddsratio(r, n1, n2, log = TRUE, ...)

Arguments

d, r, OR, logOR

Standardized difference value (Cohen's d), correlation coefficient (r), Odds ratio, or logged Odds ratio.

n1, n2

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

...

Arguments passed to or from other methods.

log

Take in or output the log of the ratio (such as in logistic models), e.g. when the desired input or output are log odds ratios instead odds ratios.

Details

Conversions between d and OR is done through these formulae:

Converting between d and r is done through these formulae:

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

Value

Converted index.

References

See Also

cohens_d()

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

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)


[Package effectsize version 0.8.7 Index]