3
$\begingroup$

Very simple. I am looking for a package that does Multivariate Linear Regression with weights on the observations. Does anyone know of a package that does this? I am shocked that I have not been able to find any.

NOTE: R does NOT do multivariate regression. The lm() help page specifically states: "If response is a matrix a linear model is fitted separately by least-squares to each column of the matrix. " This means independent regression models for each response variable. Thus lm() does NOT do multivariate linear regression. It merely does several univariate linear regressions for convenience.

$\endgroup$
2
$\begingroup$

Try package MRCE in R. This is for "Multivariate regression with covariance estimation".

$\endgroup$
  • 1
    $\begingroup$ Good suggestion! Doesn't seem to include observation weights, though. The weights ("lambdas" in the documentation), are for the independent variables... $\endgroup$ – cmo Mar 15 '13 at 20:05
-1
$\begingroup$

This is an old post, but the OP is factually wrong in claiming R doesn't do multi-variate regression.

The documentation states "If response is a matrix a linear model is fitted separately by least-squares to each column of the matrix." The key thing here is RESPONSE is a matrix. That is the Y is a matrix, then R fits ncol(Y) separate models to the same X: Y(i) ~ X.

$\endgroup$
  • 4
    $\begingroup$ I'm glad you're not downvoting, because the misunderstanding might be on your part: while multiple regression deals with multiple independent variables, multivariate regression concerns a vector-valued dependent (response) variable. It is not the same as a set of independently fitted multiple regressions to the components of the response. $\endgroup$ – whuber Nov 11 '13 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.