corSample: Sample Correlation Matrices from a Population Correlation...

Description Usage Arguments Value Author(s) References Examples

View source: R/corSample.R

Description

Sample correlation (covariance) matrices from a population correlation matrix (see Browne, 1968; Kshirsagar, 1959)

Usage

1
corSample(R, n)

Arguments

R

A population correlation matrix.

n

Sample correlation (covariance) matrices will be generated assuming a sample size of n.

Value

cor.sample

Sample correlation matrix.

cov.sample

Sample covariance matrix.

Author(s)

Niels Waller

References

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.

Examples

1
2
3
4
5
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

fungible documentation built on Sept. 29, 2021, 1:06 a.m.

Related to corSample in fungible...