[R] how to generate a random correlation matrix with restrictions

Kingsford Jones kingsfordjones at gmail.com
Sat Aug 29 03:36:28 CEST 2009


 R <- matrix(runif(10000), ncol=100)

hth,

Kingsford Jones

On Fri, Aug 28, 2009 at 7:26 PM, Ning Ma<pningma at 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 at 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.
>




More information about the R-help mailing list