*! version 1.0.0 03Sep2020

Title

r_to_d -- Conversion of Pearson's r to Cohen's d

Syntax

r_to_d
#r
,
sx(#)
delta(#)
n(#)
[
ns(#)
known
level(#)
]

The r coefficient must be a value between -1.0 and 1.0

options

* sx(#) sample standard deviation of X

* delta(#) contrast in X for which to compute Cohen's d, specified in raw units of X (not standard deviations)

* n(#) sample size used to estimate r

ns(#) sample size used to estimate sx, if different from N

known sx is known rather than estimated; the default assumes sx is estimated (which will almost always be the case)

level(#) set confidence level; default is level(95)

* sx, delta and n are required.

Description

r_to_d converts Pearson's r (computed with a continuous X and Y) to Cohen's d for use in meta-analysis using the formula by Mathur and VanderWeele (2019).
The resulting Cohen's d represents the estimated increase in standardized Y that is associated with a delta-unit increase in X.

r_to_d is an immediate command; see immed.

Options

sx(#) specifies the standard deviation of X; sx() is required.

delta(#) contrast in X for which to compute Cohen's d, specified in raw units of X (not standard deviations); delta() is required.

n(#) sample size used to estimate r; n() is required.

ns(#) sample size used to estimate sx, if different from N.

known specifies that sx is known rather than estimated; the default assumes sx is estimated (which will almost always be the case).

level(#) specifies the confidence level, as a percentage, for confidence intervals. The default is level(95).

Examples

d for a 1-unit vs. a 2-unit increase in X

. r_to_d 0.5, sx(2) delta(1) n(100)

. r_to_d 0.5, sx(2) delta(2) n(100)

d when sx is estimated in the same vs. a smaller sample (point estimate will be the same, but inference will be a little less precise in second case)

. r_to_d -0.3, sx(2) delta(2) n(300) ns(300)

. r_to_d -0.3, sx(2) delta(2) n(300) ns(30)

Stored results

esizereg stores the following in r():

Scalars

r(r) r coefficient

r(sx) standard deviation of X

r(n) sample size used to estimate r

r(d) Cohen's d

r(se) standard error of the Cohen's d estimate

r(lb_d) lower confidence bound for Cohen's d

r(ub_d) upper confidence bound for Cohen's d

esizereg also stores the following local macros, making them accessible for later use:

Macros

d Cohen's d

se standard error of the Cohen's d estimate

References

Cohen, J. (1988). Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale, NJ: Erlbaum.

Mathur, M. B. and T. J. VanderWeele. 2019. A simple, interpretable conversion from Pearson's correlation to Cohen's d for meta-analysis.
Epidemiology 31(2): e16-e18.

Citation of r_to_d

r_to_d is not an official Stata command. It is a free contribution
to the research community, like a paper. Please cite it as such:

Linden A. (2020). r_to_d: Stata module for converting Pearson's r to Cohen's d.

Authors

Ariel Linden

President, Linden Consulting Group, LLC

alinden@lindenconsulting.org

Also see

Online: esize