[R] Generation of correlated variables

Filoche pmassicotte at hotmail.com
Thu Mar 15 18:48:48 CET 2012


Hi everyone.

Based on a dependent variable (y), I'm trying to generate some independent
variables with a specified correlation. For this there's no problems.
However, I would like that have all my "regressors" to be orthogonal (i.e.
no correlation among them.

For example, 

y = x1 + x2 + x3 where the correlation between y x1 = 0.7, x2 = 0.4 and x3 =
0.8.  However, x1, x2 and x3 should not be correlated to each other.

Anyone can help me?

Regards,
Phil

--
View this message in context: http://r.789695.n4.nabble.com/Generation-of-correlated-variables-tp4475799p4475799.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list