findcpc | R Documentation |
Provides descriptive measures to decide whether there are common eigenvectors in several covariance matrices.
findcpc(covmats, B = NULL, cutoff = 0.95, plotting = TRUE, main = "Vector correlations for the permutations")
covmats |
Array of covariance matrices of the k groups. |
B |
Modal matrix p x p matrix diagonalising the k covariance matrices simultaneously, estimated under the assumption of common eigenvectors in the groups. Can be estimated using simultaneous diagonalisation algorithms such as the Flury-Gautschi (implemented in |
cutoff |
Cut-off value to use in the vector correlation scree plot. |
plotting |
Logical, indicating whether a scree plot of the vector correlations should be constructed (default = TRUE). |
main |
Title of the scree plot, if |
Identifies possibly common eigenvectors in k data groups by investigating the vectors correlations of all combinations of eigenvectors from the groups. These sets may be tested further for commonness.
Produces a scree plot of the vector correlations (if plotting = TRUE
) and returns a list with the values:
all.correlations |
Summary of all eigenvector combinations from the k groups, and the geometric means of the vector correlations. |
commonvec.order |
Order of the (possibly) common eigenvectors in the modal matrix (if an estimate was supplied). |
Theo Pepler
Pepler, P.T. (2014). The identification and application of common principal components. PhD dissertation in the Department of Statistics and Actuarial Science, Stellenbosch University.
ensemble.test
, flury.test
# Versicolor and virginica groups of the Iris data data(iris) versicolor <- iris[51:100, 1:4] virginica <- iris[101:150, 1:4] # Create array containing the two covariance matrices S <- array(NA, c(4, 4, 2)) S[, , 1] <- cov(versicolor) S[, , 2] <- cov(virginica) findcpc(covmats = S) # Estimate the modal matrix with the FG algorithm nvec <- c(nrow(versicolor), nrow(virginica)) B <- cpc::FG(covmats = S, nvec = nvec)$B findcpc(covmats = S, B = B)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.