View source: R/weighted_mean_r.R
weighted_mean_r | R Documentation |
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) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1037/1082-989X.6.2.161")}
weighted_mean_r(r = NULL, n = NULL, ci = 0.95, sigfigs = 3, silent = FALSE)
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 |
the output will be a list of vector of correlation coefficient(s).
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.