Squared multivariate correlation between two sets of variables {corrfuns} | R Documentation |
Squared multivariate correlation between two sets of variables
Description
Squared multivariate correlation between two sets of variables.
Usage
sq.correl(y, x)
Arguments
y |
A numerical matrix. |
x |
A numerical matrix. |
Details
Mardia, Kent and Bibby (1979, pg. 171) defined two squared multiple correlation coefficient between the dependent variable and the independent variable
. They mention that these are a similar measure of the coefficient determination in the univariate regression. Assume that the multivariate regression model is written as
, where
is the matrix of residuals. Then, they write
, with
and
is
. The matrix
is a generalization of
in the univariate case. Mardia, Kent and Bibby (1979, pg. 171) mentioned that the dependent variable
has to be centred.
The squared multivariate correlation should lie between 0 and 1 and this property is satisfied by the trace correlation and the determinant correlation
, defined as
and
respectively, where
denotes the dimensionality of
. So, high values indicate high proportion of variance of the dependent variables explained. Alternatively, one can calculate the trace and the determinant of the matrix
. Try something else also, use the function "sq.correl()" in a univariate regression example and then calculate the
for the same dataset. Try this example again but without centering the dependent variable. In addition, take two variables and calculate their squared correlation coefficient and then square it and using "sq.correl()".
Value
A vector with two values, the trace and determinant .
Author(s)
Michail Tsagris
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
See Also
Examples
sq.correl( iris[, 1:2], iris[, 3:4] )