RVC: Random vector correlations (RVC) method

View source: R/RVC.R

RVCR Documentation

Random vector correlations (RVC) method

Description

Identifies the number of common eigenvectors in several groups using the random vector correlations (RVC) method, adapted from Klingenberg and McIntyre (1998).

Usage

RVC(covmats, reps = 100000)

Arguments

covmats

Array of covariance matrices for the k groups.

reps

Number of randomisations to use.

Details

Vector correlations between sample eigenvectors are compared to a distribution of vector correlations between of pairs of vectors randomly generated on the unit sphere, in order to determine whether the associated eigenvectors of the population covariance matrices are common.

Value

Returns a data frame with the columns:

commonvec.order

Order of the eigenvectors in the two groups.

vec.correlations

Vector correlations of the eigenvector pairs.

p.values

P values for the null hypothesis of commonness of the eigenvector pairs.

Note

Note that this implementation of the RVC method can currently handle only two groups of data.

Author(s)

Theo Pepler

References

Klingenberg, C. P. and McIntyre, G. S. (1998). Geometric morphometrics of developmental instability: Analyzing patterns of fluctuating asymmetry with Procrustes methods. Evolution, 52(5): 1363-1375.

Pepler, P.T. (2014). The identification and application of common principal components. PhD dissertation in the Department of Statistics and Actuarial Science, Stellenbosch University.

See Also

ensemble.test

Examples

# Determine number of common eigenvectors in the covariance matrices of the 
# versicolor and virginica groups

data(iris)
versicolor <- iris[51:100, 1:4]
virginica <- iris[101:150, 1:4]

# Create array containing the covariance matrices
S <- array(NA, dim = c(4, 4, 2))
S[, , 1] <- cov(versicolor)
S[, , 2] <- cov(virginica)

RVC(covmats = S)

tpepler/cpc documentation built on July 7, 2022, 2:13 a.m.