Title: | Correlation Coefficients for Multivariate Data |
---|---|
Description: | Correlation coefficients for multivariate data, namely the squared correlation coefficient and the RV coefficient (multivariate generalization of the squared Pearson correlation coefficient). References include Mardia K.V., Kent J.T. and Bibby J.M. (1979). "Multivariate Analysis". ISBN: 978-0124712522. London: Academic Press. |
Authors: | Michail Tsagris [aut, cre] |
Maintainer: | Michail Tsagris <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0 |
Built: | 2024-11-15 06:23:49 UTC |
Source: | CRAN |
Correlation Coefficients for Multivariate Data.
Package: | mvcor |
Type: | Package |
Version: | 1.0 |
Date: | 2024-09-12 |
License: | GPL-2 |
Michail Tsagris <[email protected]>.
Michail Tsagris [email protected]
Adjusted RV correlation between two sets of variables.
arv(y, x)
arv(y, x)
y |
A numerical matrix. |
x |
A numerical matrix. |
The adjusted RV correlation coefficient is computed.
The value of the adjusted RV coefficient.
Michail Tsagris
R implementation and documentation: Michail Tsagris [email protected].
Mordant G. and Segers J. (2022). Measuring dependence between random vectors via optimal transport. Journal of Multivariate Analysis, 189: 104912.
mrv, rv, drv, sq.correl, bcdcor
arv( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
arv( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
Dissimilarity between two data matrices based on the RV coefficient.
drv(y, x)
drv(y, x)
y |
A numerical matrix. |
x |
A numerical matrix. |
The dissimilarity between the two data matrices is computed as , where
is the RV coefficient.
The value of the dissimilarity.
Michail Tsagris
R implementation and documentation: Michail Tsagris [email protected].
Josse J., Pages J. and Husson F. (2008). Testing the significance of the RV coefficient. Computational Statistics & Data Analysis, 53(1): 82–91.
drv( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
drv( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
Distance correlation.
dcor(y, x) bcdcor(y, x)
dcor(y, x) bcdcor(y, x)
y |
A numerical matrix. |
x |
A numerical matrix. |
The distance correlation or the bias corrected distance correlation of two matrices is calculated. The latter one is used for the hypothesis test that the distance correlation is zero.).
For the bias corrected distance correlation its value only. For the distance correlation a list including:
dcov |
The distance covariance. |
dvarX |
The distance variance of x. |
dvarY |
The distance variance of Y. |
dcor |
The distance correlation. |
Michail Tsagris
R implementation and documentation: Michail Tsagris <[email protected]>.
G.J. Szekely, M.L. Rizzo and N. K. Bakirov (2007). Measuring and Testing Independence by Correlation of Distances. Annals of Statistics, 35(6): 2769–2794.
dcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) ) bcdcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
dcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) ) bcdcor( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
Mantel coefficient between two sets of variables.
mantel(y, x)
mantel(y, x)
y |
A numerical matrix. |
x |
A numerical matrix. |
The Mantel coefficient is simply the Pearson correlation coefficient computed on the off-diagonal elements of the distance matrix of each each matrix (or set of variables).
The Mantel coefficient.
Michail Tsagris
R implementation and documentation: Michail Tsagris [email protected].
Abdi H. (2010). Congruence: Congruence coefficient, RV coefficient, and Mantel coefficient. Encyclopedia of Research Design, 3, 222–229.
mantel( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
mantel( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
Modified RV correlation between two sets of variables.
mrv(y, x)
mrv(y, x)
y |
A numerical matrix. |
x |
A numerical matrix. |
The modified RV correlation coefficient
The value of the modified RV coefficient.
Michail Tsagris
R implementation and documentation: Michail Tsagris [email protected].
Smilde A. K., Kiers H. A., Bijlsma S., Rubingh C. M. and Van Erk M. J. (2009). Matrix correlations for high-dimensional data: the modified RV-coefficient. Bioinformatics, 25(3): 401–405.
rv, arv, drv, sq.correl, bcdcor
mrv( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
mrv( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
RV correlation between two sets of variables.
rv(y, x)
rv(y, x)
y |
A numerical matrix. |
x |
A numerical matrix. |
The RV correlation coefficient
The value of the RV coefficient.
Michail Tsagris
R implementation and documentation: Michail Tsagris [email protected].
Robert P. and Escoufier Y. (1976). A Unifying Tool for Linear Multivariate Statistical Methods: The RV-Coefficient. Applied Statistics, 25(3): 257–265.
rv( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
rv( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
Squared multivariate correlation between two sets of variables.
sq.correl(y, x)
sq.correl(y, x)
y |
A numerical matrix. |
x |
A numerical matrix. |
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()".
A vector with two values, the trace and determinant .
Michail Tsagris
R implementation and documentation: Michail Tsagris [email protected].
sq.correl( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )
sq.correl( as.matrix(iris[, 1:2]), as.matrix(iris[, 3:4]) )