rcm {SimComp} | R Documentation |
Random Correlation Matrices
Description
Correlation matrices with random off-diagonal elements.
Usage
rcm(nrow = NULL, ncol = NULL)
Arguments
nrow |
the desired number of rows |
ncol |
the desired number of columns |
Details
As a correlation matrix is symmetric, only one of nrow
or ncol
needs to be specified.
Value
A symmetric correlation matrix with random elements.
Author(s)
Kornelius Rohmeyer and Mario Hasler
References
Holmes, R.B. (1991): On random correlation matrices. Siam Journal on Matrix Analysis and Applications 12, 239–272.
See Also
Examples
# Example 1:
# A correlation matrix representing three randomly correlated endpoints.
set.seed(1234)
rcm(nrow=3)
# Example 2:
# A correlation matrix representing five randomly correlated endpoints.
set.seed(5678)
rcm(ncol=5)
[Package SimComp version 3.3 Index]