sd: Logical. Default is FALSE. If TRUE, estimates eigenvalue standard deviation. If FALSE, estimate the eigenvalue variance.
rel: Logical. If TRUE, scales eigenvalue dispersion value by the theoretical maximum.
sample: Default is NULL. If a integer is provided, function calculates the expected integration value for that particular sample size and returns value as a deviation from the expected.
keep.positive: Logical. If TRUE, non-positive eigenvalues are removed from calculation
Returns
Integration index based on eigenvalue dispersion.
Details
This function quantifies morphological integration as the dispersion of eigenvalues in a matrix. It takes either a covariance or a correlation matrix as input, and there is no need to discern between them.The output will depend on the combination of parameters specified during input.
As default, the function calculates the relative eigenvalue variance of the matrix, which expresses the eigenvalue variance as a ratio between the actual variance and the theoretical maximum for a matrix of the same size and same amount of variance (same trace), following Machado et al. (2019). If sd=TRUE, the dispersion is measured with the standard deviation of eigenvalues instead of the variance (Pavlicev, 2009). If the sample size is provided, the function automatically calculates the expected integration value for a matrix of the same size but with no integration (e.g. a matrix with all eigenvalues equal). In that case, the result is given as a deviation from the expected and is invariant to sample size (Wagner, 1984).
Examples
cov.matrix <- RandomMatrix(10,1,1,10)# calculates the relative eigenvalue variance of a covariance matrixCalcEigenVar(cov.matrix)# calculates the relative eigenvalue variance of a correlation matrixCalcEigenVar(cov2cor(cov.matrix))# calculates the relative eigenvalue standard deviation of a covariance # matrixCalcEigenVar(cov.matrix, sd=TRUE)# calculates the absolute eigenvalue variance of a covariance matrixCalcEigenVar(cov.matrix, rel=FALSE)# to evaluate the effect of sampling error on integrationx<-mvtnorm::rmvnorm(10, sigma=cov.matrix)sample_cov.matrix<-var(x)# to contrast values of integration obtained from population covariance # matrixCalcEigenVar(cov.matrix)# with the sample integrationCalcEigenVar(sample_cov.matrix)# and with the integration measured corrected for sampling errorCalcEigenVar(sample_cov.matrix,sample=10)
References
Machado, Fabio A., Alex Hubbe, Diogo Melo, Arthur Porto, and Gabriel Marroig. 2019. "Measuring the magnitude of morphological integration: The effect of differences in morphometric representations and the inclusion of size." Evolution 33:402–411.
Pavlicev, Mihaela, James M. Cheverud, and Gunter P. Wagner. 2009. "Measuring Morphological Integration Using Eigenvalue Variance." Evolutionary Biology 36(1):157-170.
Wagner, Gunther P. 1984. "On the eigenvalue distribution of genetic and phenotypic dispersion matrices: evidence for a nonrandom organization of quantitative character variation." Journal of Mathematical Biology 21(1):77–95.