Ahh -- Mark Leeds just pointed out off-list that it was supposed to be a correlation matrix.
Perhaps R <- matrix(runif(10000), ncol=100) R <- (R * lower.tri(R)) + t(R * lower.tri(R)) diag(R) <- 1 These are of course uniformly distributed positive correlations. Kingsford On Fri, Aug 28, 2009 at 7:36 PM, Kingsford Jones<kingsfordjo...@gmail.com> wrote: > R <- matrix(runif(10000), ncol=100) > > hth, > > Kingsford Jones > > On Fri, Aug 28, 2009 at 7:26 PM, Ning Ma<pnin...@gmail.com> wrote: >> Hi, >> >> How can I generate a random 100x100 correlation matrix, R={r_ij}, >> where about 10% of r_ij are greater than 0.9 >> >> Thanks in advance. >> >> ______________________________________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.