prop.vcv.test: Proportionality test of two variance-covariance matrices

Description Usage Arguments Value References See Also Examples

Description

Tests the proportionality of two variance-covariance matrices

Usage

1
prop.vcv.test(n, S1, S2, method = 0, pa = 0)

Arguments

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')

Value

The P-value for the test of proportionality between two variance-covariance matrices

References

Mardia KV, Kent JT, Bibby JM (1979) Multivariate analysis. Academic Press, London.

See Also

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

Examples

 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"])

vcvComp documentation built on Dec. 17, 2020, 9:07 a.m.