es_from_pearson_r {metaConvert}R Documentation

Convert a Pearson's correlation coefficient to several effect size measures

Description

Convert a Pearson's correlation coefficient to several effect size measures

Usage

es_from_pearson_r(
  pearson_r,
  sd_iv,
  n_sample,
  n_exp,
  n_nexp,
  cor_to_smd = "viechtbauer",
  unit_increase_iv,
  unit_type = "raw_scale",
  reverse_pearson_r
)

Arguments

pearson_r

a Pearson's correlation coefficient value

sd_iv

the standard deviation of the independent variable

n_sample

the total number of participants

n_exp

number of the experimental/exposed group

n_nexp

number of the non-experimental/non-exposed group

cor_to_smd

formula used to convert a pearson_r or fisher_z value into a SMD.

unit_increase_iv

a value of the independent variable that will be used to estimate the Cohen's d (see details).

unit_type

the type of unit for the unit_increase_iv argument. Must be either "sd" or "value"

reverse_pearson_r

a logical value indicating whether the direction of the generated effect sizes should be flipped.

Details

This function estimates the variance of a Pearson's correlation coefficient, and computes the Fisher's r-to-z transformation. Cohen's d (D), Hedges' g (G) are converted from the Pearson's r, and odds ratio (OR) are converted from the Cohen's d.

  1. The formula used to estimate the standard error of the Pearson's correlation coefficient and 95% CI are (Formula 12.27 in Cooper):

    R_se=(1pearson_r2)2n_sample1R\_se = \sqrt{\frac{(1 - pearson\_r^2)^2}{n\_sample - 1}}

    R_lo=pearson_rqt(.975,n_sample2)R_seR\_lo = pearson\_r - qt(.975, n\_sample - 2) * R\_se

    R_up=pearson_r+qt(.975,n_sample2)R_seR\_up = pearson\_r + qt(.975, n\_sample - 2) * R\_se

  2. The formula used to estimate the Fisher's z are (Formula 12.28 & 12.29 in Cooper):

    Z=atanh(r)Z = atanh(r)

    Z_se=1n_sample3Z\_se = \frac{1}{n\_sample - 3}

    Z_ci_lo=Zqnorm(.975)Z_seZ\_ci\_lo = Z - qnorm(.975) * Z\_se

    Z_ci_up=Z+qnorm(.975)Z_seZ\_ci\_up = Z + qnorm(.975) * Z\_se

  3. Several approaches can be used to convert a correlation coefficient to a SMD.

A. Mathur proposes to use this formula (Formula 1.2 in Mathur, cor_to_smd = "mathur"):

increase=ifelse(unittype=="sd",unit_increase_ivsd_dv,unit_increase_iv)increase = ifelse(unit_type == "sd", unit\_increase\_iv * sd\_dv, unit\_increase\_iv)

d=rincreasesdiv1r2d = \frac{r * increase}{sd_iv * \sqrt{1 - r^2}}

d_se=abs(d)1r2(n_sample3)+12(n_sample1))d\_se = abs(d) * \sqrt{\frac{1}{r^2 * (n\_sample - 3)} + \frac{1}{2*(n\_sample - 1))}}

The resulting Cohen's d is the average increase in the dependent variable associated with an increase of x units in the independent variable (with x = unit_increase_iv).

B. Viechtbauer proposes to use the delta method to derive a Cohen's d from a correlation coefficient (Viechtbauer, 2023, cor_to_smd = "viechtbauer")

C. Cooper proposes to use this formula (Formula 12.38 & 12.39 in Cooper, cor_to_smd = cooper):

increase=ifelse(unittype=="sd",unit_increase_ivsd_dv,unit_increase_iv)increase = ifelse(unit_type == "sd", unit\_increase\_iv * sd\_dv, unit\_increase\_iv)

d=rincreasesd_iv1r2d = \frac{r * increase}{sd\_iv * \sqrt{1 - r^2}}

d_se=abs(d)1r2(n_sample3)+12(n_sample1))d\_se = abs(d) * \sqrt{\frac{1}{r^2 * (n\_sample - 3)} + \frac{1}{2*(n\_sample - 1))}}

Note that this formula was initially proposed for converting a point-biserial correlation to Cohen's d. It will thus produce similar results to the cor_to_smd = "mathur" option only when unit_type = "sd" and unit_increase_iv = 2.

To know how the Cohen's d value is converted to other effect measures (G/OR), see details of the es_from_cohen_d function.

Value

This function estimates and converts between several effect size measures.

natural effect size measure R + Z
converted effect size measure D + G + OR
required input data See 'Section 4. Pearson's r or Fisher's z'
https://metaconvert.org/html/input.html

References

Cooper, H., Hedges, L.V., & Valentine, J.C. (Eds.). (2019). The handbook of research synthesis and meta-analysis. Russell Sage Foundation.

Mathur, M. B., & VanderWeele, T. J. (2020). A Simple, Interpretable Conversion from Pearson's Correlation to Cohen's for d Continuous Exposures. Epidemiology (Cambridge, Mass.), 31(2), e16–e18. https://doi.org/10.1097/EDE.0000000000001105

Viechtbauer W (2010). “Conducting meta-analyses in R with the metafor package.” Journal of Statistical Software, 36(3), 1–48. doi:10.18637/jss.v036.i03.

Examples

es_from_pearson_r(
  pearson_r = .51, sd_iv = 0.24, n_sample = 214,
  unit_increase_iv = 1, unit_type = "sd"
)

[Package metaConvert version 1.0.0 Index]