I have 2 response variables (Y1, Y2) and some independent variables. I need to predict both Y1 and Y2 using the same set of predictors.In other words I need to fit the model:
$Y$ has $n$ rows and $q$ columns,
$X$ has $n$ rows and $p$ columns,
$B$ has $p$ rows and $q$ columns,
$E$ has $n$ rows and $q$ columns.
In this case, $q=2$.
One way to do this in R is by calling the lm() function:
This is equivalent to fitting two univariate multiple regression models, one for Y1, and the other for Y2:
How can I fit a multivariate multiple linear regression model for both Y1 and Y2 which permits correlation between Y1 and Y2?
Thank you in advance.