[R] constructing arbitrary (positive definite) covariance matrix

2008-06-26 Thread Mizanur Khondoker
Dear list, I am trying to use the 'mvrnorm' function from the MASS package for simulating multivariate Gaussian data with given covariance matrix. The diagonal elements of my covariance matrix should be the same, i.e., all variables have the same marginal variance. Also all correlations between

Re: [R] constructing arbitrary (positive definite) covariance matrix

2008-06-26 Thread Gabor Grothendieck
Not sure if this is sufficient but nearcor in the sfsmisc package will find the nearest correlation matrix to a given matrix. On Thu, Jun 26, 2008 at 12:11 PM, Mizanur Khondoker <[EMAIL PROTECTED]> wrote: > Dear list, > > I am trying to use the 'mvrnorm' function from the MASS package for > simu