Description Usage Arguments Value References Examples
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).
1 |
K |
Number of effect sizes to generate. |
correlation |
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 |
A data table with columns of random effect sizes (r), their variances and sample sizes.
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.
1 | random_r(K = 5, correlation = 0.5, N = 50)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.