: 50
Date: Mon, 13 Aug 2007 17:15:12 -0400
From: Jiao Yang [EMAIL PROTECTED]
Subject: [R] simulate data from multivariate normal with pre-specified
correlation matrix
To: r-help@stat.math.ethz.ch
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii
For example, the correlation matrix is 3x3 and looks like
1 0.75 0 0 0
0.751 0 0 0
0 0 0 0 0
Can I write the code like this?
p- 3 # number of variables per observation
N- 10 # number of samples
# define population correlation matrix sigma
sigma-matrix(0,p,p)