[R] R-squared values for multiple linear regression with a matrix of multiple response variables

Manabu Sakamoto manabu.sakamoto at gmail.com
Thu Jun 23 15:41:21 CEST 2011


Dear list,

I have a matrix Y of multiple response variables and a matrix X of
predictor variables and I would like to fit a multivariate multiple
regression model and compute the R2-value to determine the overall
proportion of variance of the response matrix Y that is explained by
the predictor matrix X.

I have been using manova(Y ~ X) to assess the significance of the
linear model. I am also using lm(Y ~ X) or lm(cbind(y1, y2, ...) ~ x1
+ x2 + x3 +....) but these seem to fit separate multiple linear models
to each response variable, i.e., summary(lm_object) would return a
list of regression summaries for each response variable.

I would actually like to fit a model on the two matrices with one as
the response and the other as the predictor, and compute an R2 value
of the correlation between the two matrices. Is there a built-in
function in R that does this? If not, how can I compute an R2 value of
a correlation between two matrices?


best,
Manabu
-- 
Manabu Sakamoto, PhD
School of Earth Sciences
University of Bristol
manabu.sakamoto at googlemail.com



More information about the R-help mailing list