scaling.BW: Scaling factor between two matrices

Description Usage Arguments Value See Also Examples

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

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# 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

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