corSample | R Documentation |
Sample correlation (covariance) matrices from a population correlation matrix (see Browne, 1968; Kshirsagar, 1959)
corSample(R, n)
R |
A population correlation matrix. |
n |
Sample correlation (covariance) matrices will be generated assuming a sample size of n. |
cor.sample |
Sample correlation matrix. |
cov.sample |
Sample covariance matrix. |
Niels Waller
Browne, M. (1968). A comparison of factor analytic techniques. Psychometrika, 33(3), 267-334.
Kshirsagar, A. (1959). Bartlett decomposition and Wishart distribution. The Annals of Mathematical Statistics, 30(1), 239-241.
R <- matrix(c(1, .5, .5, 1), 2, 2)
# generate a sample correlation from pop R with n = 25
out <- corSample(R, n = 25)
out$cor.sample
out$cov.sample
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.