G'day Lisa,

>>>>> "LW" == Lisa Wang <[EMAIL PROTECTED]> writes:

    LW> I would like to simulate X --Normal (20, 5) Y-- Normal (40,
    LW> 10) and the correlation between X and Y is 0.6.

    LW> How do I do it in R?
That depends on what you want the joint distribution to be. :)

If you want the joint distribution to be normal, you could use the
function mvrnorm() from the MASS package.

HTH.

Cheers,

        Berwin

========================== Full address ============================
Berwin A Turlach                      Tel.: +61 (8) 6488 3338 (secr)   
School of Mathematics and Statistics        +61 (8) 6488 3383 (self)      
The University of Western Australia   FAX : +61 (8) 6488 1028
35 Stirling Highway                   
Crawley WA 6009                e-mail: [EMAIL PROTECTED]
Australia                        http://www.maths.uwa.edu.au/~berwin

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to