
Calculates the modified Krzanowski correlation between matrices, projecting the variance in each principal components of the first matrix in to the ret.dim.2 components of the second matrix.
KrzProjection(cov.x, cov.y, ...)# S3 method for default
KrzProjection(cov.x, cov.y, ret.dim.1 = NULL, ret.dim.2 = NULL, ...)
# S3 method for list
KrzProjection(
cov.x,
cov.y = NULL,
ret.dim.1 = NULL,
ret.dim.2 = NULL,
parallel = FALSE,
full.results = FALSE,
...
)
Ratio of projected variance to total variance, and ratio of projected total in each PC
Single covariance matrix ou list of covariance matrices. If cov.x is a single matrix is supplied, it is compared to cov.y. If cov.x is a list of matrices is supplied and no cov.y is supplied, all matrices are compared between each other. If cov.x is a list of matrices and a single cov.y matrix is supplied, all matrices in list are compared to it.
First argument is compared to cov.y. If cov.x is a list, every element in cov.x is projected in cov.y.
additional arguments passed to other methods
number of retained dimensions for first matrix in comparison, default for nxn matrix is n/2-1
number of retained dimensions for second matrix in comparison, default for nxn matrix is n/2-1
if TRUE computations are done in parallel. Some foreach back-end must be registered, like doParallel or doMC.
if FALSE returns only total variance, if TRUE also per PC variance.
Diogo Melo, Guilherme Garcia
Krzanowski, W. J. (1979). Between-Groups Comparison of Principal Components. Journal of the American Statistical Association, 74(367), 703. doi:10.2307/2286995
RandomSkewers
,MantelCor
c1 <- RandomMatrix(10)
c2 <- RandomMatrix(10)
KrzProjection(c1, c2)
# \donttest{
m.list <- RandomMatrix(10, 3)
KrzProjection(m.list)
KrzProjection(m.list, full.results = TRUE)
KrzProjection(m.list, ret.dim.1 = 5, ret.dim.2 = 4)
KrzProjection(m.list, ret.dim.1 = 4, ret.dim.2 = 5)
KrzProjection(m.list, c1)
KrzProjection(m.list, c1, full.results = TRUE)
# }
if (FALSE) {
#Multiple threads can be used with some foreach backend library, like doMC or doParallel
library(doMC)
registerDoMC(cores = 2)
KrzProjection(m.list, parallel = TRUE)
}
Run the code above in your browser using DataLab