Re: [R] How to simulate correlated data

From: Doran, Harold <HDoran_at_air.org>
Date: Fri 16 Dec 2005 - 02:38:36 EST


See ?mvrnorm

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Lisa Wang Sent: Thursday, December 15, 2005 10:34 AM To: R-Help
Subject: [R] How to simulate correlated data

Hello there,

I would like to simulate X --Normal (20, 5)

                         Y-- Normal (40, 10)

and the correlation between X and Y is 0.6. How do I do it in R?

Thank you very much

Lisa Wang Msc.
Princess Margaret Hospital
Toronto, Ca



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Dec 16 03:00:59 2005

This archive was generated by hypermail 2.1.8 : Fri 16 Dec 2005 - 04:29:51 EST