scaling.BW {vcvComp} | R Documentation |
Scaling factor between two matrices
Description
Computes the maximum-likelihood estimate of the scaling factor between two proportional covariance matrices. Note that the scaling factor between the two matrices is equal to the arithmetic mean of their relative eigenvalues.
Usage
scaling.BW(S1, S2, method = 0, pa = 0)
Arguments
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 scaling factor between the two matrices.
See Also
See minv
for the method and the parameter used for the matrix inversion
Examples
# 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])
# Between-group (B) and within-group (W) covariance matrices for all populations
B <- cov.B(proc.coord, groups = Tropheus.IK.coord$POP.ID, sex = Tropheus.IK.coord$Sex)
W <- cov.W(proc.coord, groups = Tropheus.IK.coord$POP.ID, sex = Tropheus.IK.coord$Sex)
# ML estimate of the scaling factor between B and W
sc <- scaling.BW(B, W)
# Scaling of B to W
Bsc <- B / sc
[Package vcvComp version 1.0.2 Index]