# Re: [R] How to generate a correlation matrix with restrictions on its eigenvalues

From: Chee Chen <chee.chen_at_yahoo.com>
Date: Sat, 16 Apr 2011 11:26:28 -0400

Hi, Ravi,
Thank you, but I did not get it!
I tried hard by specifying the vector of probabilities, but it always gives zeros and all integers as eigenvalues. The eigenvalues need to be not just integers and they should satisfy order requirement. Any more suggestions?
Regards,
-Chee

Sent: Friday, April 15, 2011 8:14 AM
To: Chee Chen ; r-help_at_r-project.org
Subject: RE: [R] How to generate a correlation matrix with restrictions on its eigenvalues

Generate random numbers from a multinomial.

?rmultinom
# The following will generate n multinomial vectors each of size m rmultinom(n, size=m, prob=m^(-1/8)) # you need to specify probabilities appropriately

Ravi.

From: r-help-bounces_at_r-project.org [r-help-bounces_at_r-project.org] On Behalf Sent: Thursday, April 14, 2011 11:55 PM
To: r-help_at_r-project.org
Subject: [R] How to generate a correlation matrix with restrictions on its eigenvalues

Dear All,
I would like to generate m positive real numbers c_i, I=1,...,m, such that (1) c_1 + c_2 + ... + c_m=m,
(1) after being ordered into c_1 >= c_2 >= .... >=c_m>0, we have that c_m is of the same order of m^(-1/8), when m is sufficiently large. Thanks,
-Chee

[[alternative HTML version deleted]]

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.=

[[alternative HTML version deleted]]

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. Received on Sat 16 Apr 2011 - 15:27:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 16 Apr 2011 - 15:30:30 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.