weighted_mean_r {kim} | R Documentation |
Weighted mean correlation
Description
Calculate the weighted mean correlation coefficient for a given correlations and sample sizes. This function uses the Hedges-Olkin Method with random effects. See Field (2001) doi:10.1037/1082-989X.6.2.161
Usage
weighted_mean_r(r = NULL, n = NULL, ci = 0.95, sigfigs = 3, silent = FALSE)
Arguments
r |
a (vector of) correlation coefficient(s) |
n |
a (vector of) sample size(s) |
ci |
width of the confidence interval. Input can be any value
less than 1 and greater than or equal to 0. By default, |
sigfigs |
number of significant digits to round to (default = 3) |
silent |
logical. If |
Value
the output will be a list of vector of correlation coefficient(s).
Examples
weighted_mean_r(r = c(0.2, 0.4), n = c(100, 100))
weighted_mean_r(r = c(0.2, 0.4), n = c(100, 20000))
# example consistent with using MedCalc
weighted_mean_r(
r = c(0.51, 0.48, 0.3, 0.21, 0.6, 0.46, 0.22, 0.25),
n = c(131, 129, 155, 121, 111, 119, 112, 145))