[R] Generate a serie of new vars that correlate with existing var

Nguyen Dinh Nguyen n.nguyen at garvan.org.au
Mon Apr 2 03:47:25 CEST 2007

Dear R helpers,
I have a var (let call X1) with approximately Normal distribution (say,
mean=15, SD=5).
I want to generate a series of additional vars X2, X3, X4…such that the
correlation between X2 and X1 is o.4, X3 and X1 is 0.5, X4 and X1 is 0.6 and
so on with the condition all variables X2, X3, X4….have the same mean and SD
with X1.
Any help should be appreciated

More information about the R-help mailing list