Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

How can I express multiple response variables for linear model?

For example, I can do this with single response variable

 lm(Y1 ~ X1+X2+X3, data=somedata)

But if I want to use Y1-Y100 response variable in the model, how can I do that?

UPDATE: I am hasty. I just found an answer from http://www.mail-archive.com/r-help@r-project.org/msg73770.html

with(data, lm.fit(x=cbind(Intercept=1,x1,x2,x3), y=cbind(y1,y2,y3)))

and this one works too

 lm(cbind(Y1,Y2,Y3) ~ X1+X2+X3, data=somedata)
share|improve this question
3  
How about this post? – conjugateprior Apr 18 '12 at 21:00
@ConjugatePrior Oh my ignorance :) That is working OK too. Thanks! – david Apr 18 '12 at 21:07

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.