[R] how to link matrix with the variables

From: zhijie zhang <epistat_at_gmail.com>
Date: Thu 10 Aug 2006 - 11:06:27 EST

Dear friends,
  Suppose the correlation matrix of x1-x3 is as follows:

     x1 x2 x3
x1 1
x2 0.5 1
x3 0.6 0.4 1
1.First, to generate the matrix of x1-x3 in R; 2.to get the random number: x1<-rnorm(10), is it enough to generate only the x1-values? Do i need to generate x2 and x3? 3. y=x1+2*x2+3*x3 , to generate the y-values; Thanks very much!

Kind Regards,
Zhi Jie,Zhang

	[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu Aug 10 11:12:18 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 10 Aug 2006 - 12:21:28 EST.

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