Generates a random correlation matrix
with the method of Marsaglia and Olkin (1984).
Usage
rcorr(d)
Arguments
d
an integer > 0, the order of the correlation matrix.
Value
a correlation matrix of order d.
Details
The algorithm uses rsphere to generate $d$
vectors on a sphere in $d$-space. If $Z$
is a matrix with such vectors as rows, then the random
correlation matrix is $ZZ'$.
References
Marshall, G.& Olkin, I. (1984).Generating correlation
matrices. SIAM J. Sci. Stat. Comput., 5, 2, 470--475.