[R] Create two uniformly random variables correlated

Enrico Schumann enricoschumann at yahoo.de
Thu Aug 25 16:15:31 CEST 2011


This topic has been discussed (quite recently) on R-help.

http://r.789695.n4.nabble.com/Generating-uniformly-distributed-correlated-da
ta-td3314905.html


Enrico

> -----Ursprüngliche Nachricht-----
> Von: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] Im Auftrag von Soberon 
> Velez, Alexandra Pilar
> Gesendet: Donnerstag, 25. August 2011 11:15
> An: r-help at r-project.org
> Betreff: [R] Create two uniformly random variables correlated
> 
> Hello,
> 
> 
> 
> I want to create two random variables (x1,x2) both with 
> uniform distribution bounded by (-1) and (1) that has a 
> correlation of 0.6 between them.
> 
> 
> 
> Does somebody know how I can do it? For normal random 
> variables I known how to implement it with the rmvnorm 
> command but I don't know how to do it with variables 
> uniformly distributed.
> 
> 
> 
> Thanks a lot.
> 
> Alexandra
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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