Hello, I need your help! Probably the answer is quite easy, but still ... How can I sample two (or more) vectors of data from a normal distribution so they are correlated with an exact value I select (for example pearson's r = .30)? Thanks! James [[alternative HTML version deleted]]
Hello On 12/14/09, Anja Mohorko <nekostrgano at yahoo.com> wrote:> Hello, I need your help! Probably the answer is quite easy, but still ... > How can I sample two (or more) vectors of data from a normal distribution so they are correlated with an exact value I select (for example pearson's r = .30)? >require(MASS) Sigma <- matrix(c(10,3,3,2),2,2) Sigma mvrnorm(n=1000, rep(0, 2), Sigma) Liviu
Apparently Analagous Threads
- RGTK2 and glade on Windows - GUI newbie
- bootstrapping a matrix and calculating Pearson's correlation coefficient
- Generating artificial datasets with a specific correlation coefficient.
- confidential interval of correlation coefficient using bootstrap
- (OT) Does pearson correlation assume bivariate normality of the data?