es_from_phi {metaConvert} | R Documentation |
Convert a phi value to several effect size measures
Description
Convert a phi value to several effect size measures
Usage
es_from_phi(phi, n_cases, n_exp, n_sample, reverse_phi)
Arguments
phi |
phi value |
n_cases |
total number of cases/events |
n_exp |
total number of participants in the exposed group |
n_sample |
total number of participants in the sample |
reverse_phi |
a logical value indicating whether the direction of generated effect sizes should be flipped. |
Details
The functions computes an odds ratio (OR), risk ratio (RR), and number needed to treat (NNT) from the the phi coefficient, the total number of participants, the total number of cases and the total number of people exposed. Cohen's d (D) and Hedges' g (G) are tried to be obtained from the OR, or are converted using the approach by Lipsey et al. (2001). The correlation coefficients (R/Z) are converted by assuming that the phi coefficient is equal to a R, and the variances of R and Z are obtained using the approach proposed by Lipsey et al. (2001) as well as by our own calculations.
To estimate the OR, RR, NNT,, this function reconstructs a 2x2 table (using the approach proposed by Viecthbauer, 2023).
Then, the calculations of the es_from_2x2()
function are applied.
To estimate the Cohen's d (D) and Hedges' g (G), the function first tries to convert it from the OR obtained using the approach described above. If not possible (e.g., the number of cases and exposed are missing) the function converts the Cohen's d from the Phi coefficient using the approach proposed by Lipsey et al. (2001):
d = \frac{2 * phi}{\sqrt{1 - phi^2}}
d\_se = \sqrt{\frac{d}{phi^2 * n\_sample}}
To estimate the correlation coefficients (R/Z), this function assumes that the phi coefficient is equal to a correlation coefficient, and then obtains the variance using the formula proposed by Lipsey et al. (2001):
r = phi
z = atanh(r)
z\_se = \frac{z^2}{phi^2 * n\_sample}
effective\_n = \frac{1}{z\_se + 3}
r\_se = \sqrt{\frac{(1 - r^2)^2}{effective\_n - 1}}
Note that the approach to determine the standard error of R was developed by our team.
Value
This function estimates and converts between several effect size measures.
natural effect size measure | OR + RR + NNT |
converted effect size measure | D + G + R + Z |
required input data | See 'Section 8. Phi or chi-square' |
https://metaconvert.org/html/input.html | |
References
Viechtbauer (2023). Accessed at https://wviechtb.github.io/metafor/reference/conv.2x2.html. Lipsey, M. W., & Wilson, D. B. (2001). Practical meta-analysis. Sage Publications, Inc.
Examples
es_from_phi(phi = 0.3, n_sample = 120, n_cases = 20, n_exp = 40)