random_r: Random generation of correlation coefficients.
Description
Generates random correlation coefficients (r or Pearson product-moment
correlation coefficients) and their variances (Pearson 1895). Also provides
Fisher z-transformed correlation coefficients (Fisher 1915).
The mean population correlation coefficient (rho) to
simulate. Must range between -1 to 1.
N
The number of samples used to estimate each correlation coefficient.
When a non-negative integer, all r will be estimated using the same N. A
vector of unequal N's can also be taken; if so, K will be ignored and the
number of randomly generated r will equal the length of that vector.
Fisher_Z
When TRUE, also returns the Fisher z-transformed
correlation coefficients and their variances (Fisher 1915).
Value
A data table with columns of random effect sizes (r), their variances
and sample sizes.
References
Pearson, K. 1895. Notes on regression and inheritance in the
case of two parents. Proceedings of the Royal Society of
London 58: 240-242.
Fisher, R.A. 1915. Frequency distribution of the values of the
correlation coefficient in samples of an indefinitely large
population. Biometrika 10: 507-521.