r1 {MatrixCorrelation}R Documentation

Correlational Measures for Matrices

Description

Matrix similarity as described by Ramsey et al. (1984).

Usage

r1(X1, X2)

r2(X1, X2)

r3(X1, X2)

r4(X1, X2)

GCD(X1, X2, ncomp1 = Rank(X1) - 1, ncomp2 = Rank(X2) - 1)

Arguments

X1

first matrix to be compared (data.frames are also accepted).

X2

second matrix to be compared (data.frames are also accepted).

ncomp1

(GCD) number of subspace components from the first matrix (default: full subspace).

ncomp2

(GCD) number of subspace components from the second matrix (default: full subspace).

Details

Details can be found in Ramsey's paper:

Value

A single value measuring the similarity of two matrices.

Author(s)

Kristian Hovde Liland

References

Ramsay, JO; Berg, JT; Styan, GPH; 1984. "Matrix Correlation". Psychometrica 49(3): 403-423.

See Also

SMI, RV (RV2/RVadj).

Examples

X1  <- matrix(rnorm(100*300),100,300)
usv <- svd(X1)
X2  <- usv$u[,-3] %*% diag(usv$d[-3]) %*% t(usv$v[,-3])

r1(X1,X2)
r2(X1,X2)
r3(X1,X2)
r4(X1,X2)
GCD(X1,X2)
GCD(X1,X2, 5,5)


[Package MatrixCorrelation version 0.9.2 Index]