This function computes a minimally biased average of correlation values. This is needed because simple averaging of correlations is negatively biased, and the often used z-transformation method of averaging correlations is positively biased. The algorithm was developed by Olkin & Pratt (1958).
cormean(
r,
n,
wts = c("none", "n", "df"),
type = c("OP5", "OP2", "OPK"),
na.rm = F
)
An average correlation.
a vector containing correlation values
a single value or vector containing sample sizes
Character. How should the correlations be weighted?
none
leads to no weighting, n
weights by sample size, df
weights by sample size minus one.
Character. Determines which averaging algorithm to use, with "OP5" being the most accurate.
Logical. Should missing values be removed?
Olkin, I., & Pratt, J. (1958). Unbiased estimation of certain correlation coefficients. The Annals of Mathematical Statistics, 29. https://doi.org/10.1214/aoms/1177706717
Shieh, G. (2010). Estimation of the simple correlation coefficient. Behavior Research Methods, 42(4), 906-917. https://doi.org/10.3758/BRM.42.4.906
cormean(c(0,.3,.5),c(30,30,60))
Run the code above in your browser using DataLab