[R] Simulate data based on correlation coefficient

Greg Snow Greg.Snow at intermountainmail.org
Mon Oct 8 20:49:50 CEST 2007


Similar questions have been asked here before.  See http://finzi.psych.upenn.edu/R/Rhelp02a/archive/110042.html for one possible answer (your case will be simpler than this).

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
 
 

> -----Original Message-----
> From: r-help-bounces at r-project.org 
> [mailto:r-help-bounces at r-project.org] On Behalf Of Gustavo
> Sent: Friday, October 05, 2007 8:48 PM
> To: r-help at r-project.org
> Subject: [R] Simulate data based on correlation coefficient
> 
> Hello all,
> 
> 
> 
> I have a vector with 1000 values and I would like to generate 
> other correlated vector, but with different correlation 
> coefficient (for example, r = 0.7).
> 
> Any ideas how can I do this?
> 
> 
> 
> Regards,
> 
> Gustavo.
> 
> 
> 	
> 
> 	
> 		
> _______________________________________________________ 
> 
> Experimente já e veja as novidades.
> 
> ______________________________________________
> 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