| scaling.BW | R Documentation |
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.
scaling.BW(S1, S2, method = 0, pa = 0)
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 scaling factor between the two matrices.
See minv for the method and the parameter used for the matrix inversion
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.