| rcm {SimComp} | R Documentation |
Correlation matrices with random off-diagonal elements.
rcm(nrow = NULL, ncol = NULL)
nrow |
the desired number of rows |
ncol |
the desired number of columns |
As a correlation matrix is symmetric, only one of nrow or ncol
needs to be specified.
A symmetric correlation matrix with random elements.
Kornelius Rohmeyer and Mario Hasler
Holmes, R.B. (1991): On random correlation matrices. Siam Journal on Matrix Analysis and Applications 12, 239–272.
# 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)