[R] How to simulate correlated data

R. Michael Weylandt michael.weylandt at gmail.com
Mon Dec 3 00:36:05 CET 2012


Look at MASS:mvrnorm

MW

On Sun, Dec 2, 2012 at 4:57 PM, rahul143 <rk204885 at gmail.com> wrote:
> 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
>
>
>
> -----
>    TO GET MORE DETAILS CLICK HERE
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-simulate-correlated-data-tp4651667.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list