rcm: Random Correlation Matrices

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/rcm.R

Description

Correlation matrices with random off-diagonal elements.

Usage

1

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

ermvnorm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# 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)

SimComp documentation built on Aug. 26, 2019, 5:03 p.m.