Description Usage Arguments Value References See Also Examples
Tests the proportionality of two variance-covariance matrices
1 | prop.vcv.test(n, S1, S2, method = 0, pa = 0)
|
n |
the sample size(s), given as a number or a vector of length 2 |
S1 |
a variance-covariance matrix |
S2 |
a variance-covariance matrix |
method |
an integer for the method of matrix inversion (see function 'minv') |
pa |
an integer for the parameter of matrix inversion (see function 'minv') |
The P-value for the test of proportionality between two variance-covariance matrices
Mardia KV, Kent JT, Bibby JM (1979) Multivariate analysis. Academic Press, London.
relative.eigen
for the computation of relative eigenvalues,
minv
for the method and the parameter used for the matrix inversion,
pchisq
for Chi-squared distribution
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Data matrix of 2D landmark coordinates
data("Tropheus.IK.coord")
coords <- which(names(Tropheus.IK.coord) == "X1"):which(names(Tropheus.IK.coord) == "Y19")
proc.coord <- as.matrix(Tropheus.IK.coord[coords])
# Data reduction
phen.pca <- prcomp(proc.coord, rank. = 5, tol = sqrt(.Machine$double.eps))
pc.scores <- phen.pca$x
# Covariance matrix of each population
S.phen.pop <- cov.group(pc.scores, groups = Tropheus.IK.coord$POP.ID)
# Maximum likelihood test of proportionality between 2 covariance matrices
# (IKA1 relative to IKS5) - 71 and 75 are the sample sizes
prop.vcv.test(n = c(71, 75), S.phen.pop[,,"IKA1"], S.phen.pop[,,"IKS5"])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.