[R] how to do regression analysis for multiple dependent variables at once
baron at cattell.psych.upenn.edu
Sat Feb 15 13:26:03 CET 2003
On 02/15/03 14:08, Hiroto Miyoshi wrote:
>I have, say, 5 dependent variables, d1 to d5.
>And I also have 2 independent variable x1, x2.
>Suppose I need to do regression analyses for all
>the dependent variables, using the same set
>of independent variables, x1 and x2.
>How can I do the analyses without writing five lines of
This is because the dependent variable in lm() can be a matrix
instead of a vector.
It says this in "In introduction to R" under "Formula for
statistical models." But I could not find this in the help page
for lm() or formula().
Jonathan Baron, Professor of Psychology, University of Pennsylvania
R page: http://finzi.psych.upenn.edu/
More information about the R-help