Skip to content
Prev 191801 / 398500 Next

how to generate a random correlation matrix with restrictions

Thanks Ravi -- with my limited linear algebra skills I was assuming
invertible symmetric was sufficient (rather than just necessary) for
positive definiteness.  So, the open challenge is to generate a pd
matrix of dimension 100 with r_ij = 1 if i=j else -1< r_ij< 1, with
about 10% of the elements >.9.

I tried for a bit without luck, but I can offer another way to
generate a pd matrix:

ev <- runif(100) # choose some positive eigenvalues
U <- svd(matrix(runif(10000), nc=100))$u  # an orthogonal matrix
pdM <- U %*% diag(ev) %*% t(U)


Kingsford
On Fri, Aug 28, 2009 at 9:41 PM, Ravi Varadhan<rvaradhan at jhmi.edu> wrote: