[R] how to do multiple responses in a linear regression

Hao Cen hcen at andrew.cmu.edu
Thu Dec 24 18:33:53 CET 2009


Hi,

I have multiple responses y1, y2, .., yn, and would like to do linear
regression for each of them with x1, x2, ..., xm. Instead of doing
regression n times, it it possible to do it all at once?

I tried lm(y1+y2 ~ x1 + x2 + x3) and lm added y1 y2 and then did the
regression.

thanks

Jeff




More information about the R-help mailing list