Re: [R] Generating a stochastic matrix with a specified second dominant eigenvalue

2009-10-17 Thread Jeff Newmiller
Ravi Varadhan wrote: Hi, Given a positive integer N, and a real number \lambda such that 0 < \lambda < 1, I would like to generate an N by N stochastic matrix (a matrix with all the rows summing to 1), such that it has the second largest eigenvalue equal to \lambda (Note: the dominant eigenvalu

Re: [R] Generating a stochastic matrix with a specified second dominant eigenvalue

2009-10-16 Thread David Winsemius
A further idea: Consider the triangular square matrices of the form with decreasing eigenvalues on the diagonal: 1 0 0 0 0 0 .3 .7 0 0 0 0 .4 .2 .4 0 0 0 .2 .4 .2 .2 0 0 .1 .3 .4 .2 .1 0 .2 .2 .2 .2 .1 .1 This would have the specified eigenvalue compo

Re: [R] Generating a stochastic matrix with a specified second dominant eigenvalue

2009-10-16 Thread Albyn Jones
-- > --- > > Ravi Varadhan, Ph.D. > > Assistant Professor, The Center on Aging and Health > > Division of Geriatric Medicine and Gerontology > > Johns Hopkins University > > Ph: (410) 502-2619 > > Fax: (410) 614-9625 > > Email: rvarad...@jhmi.edu

Re: [R] Generating a stochastic matrix with a specified second dominant eigenvalue

2009-10-16 Thread David Winsemius
On Oct 15, 2009, at 6:24 PM, Ravi Varadhan wrote: Hi, Given a positive integer N, and a real number \lambda such that 0 < \lambda < 1, I would like to generate an N by N stochastic matrix (a matrix with all the rows summing to 1), such that it has the second largest eigenvalue equal to

Re: [R] Generating a stochastic matrix with a specified second dominant eigenvalue

2009-10-16 Thread Ravi Varadhan
625 Email: rvarad...@jhmi.edu Webpage: http://www.jhsph.edu/agingandhealth/People/Faculty_personal_pages/Varadhan.h tml -Original Message- From: Albyn Jones [mailto:jo...@reed.edu] Sent: Thursday, October 15, 2009 6:56 PM To: Ravi Varadhan Cc: r-help@r-project.org Subject: Re: [R] Generating a s

Re: [R] Generating a stochastic matrix with a specified second dominant eigenvalue

2009-10-15 Thread Albyn Jones
I just tried the following shot in the dark: generate an N by N stochastic matrix, M. I used M = matrix(runif(9),nrow=3) M = M/apply(M,1,sum) e=eigen(M) e$values[2]= .7 (pick your favorite lambda, you may need to fiddle with the others to guarantee this is second largest

[R] Generating a stochastic matrix with a specified second dominant eigenvalue

2009-10-15 Thread Ravi Varadhan
Hi, Given a positive integer N, and a real number \lambda such that 0 < \lambda < 1, I would like to generate an N by N stochastic matrix (a matrix with all the rows summing to 1), such that it has the second largest eigenvalue equal to \lambda (Note: the dominant eigenvalue of a stochastic ma