Exv.VXXa: Moments of "bias-corrected" eigenvalue dispersion indices

Exv.VXXaR Documentation

Moments of “bias-corrected” eigenvalue dispersion indices

Description

Functions to calculate expectation/variance of eigenvalue dispersion indices of covariance/correlation matrices

Exv.VESa(): expectation of unbiased eigenvalue variance of covariance matrix; of little practical use because this is just the population value V(\mathbf{\Sigma})

Exv.VRSa(): expectation of adjusted relative eigenvalue variance of covariance matrix

Exv.VRRa(): expectation of adjusted relative eigenvalue variance of correlation matrix

Var.VESa(): variance of unbiased eigenvalue variance of covariance matrix

Var.VRSa(): variance of adjusted relative eigenvalue variance of covariance matrix

Var.VRRa(): variance of adjusted relative eigenvalue variance of correlation matrix

Usage

Exv.VESa(
  Sigma,
  n = 100,
  Lambda,
  drop_0 = FALSE,
  tol = .Machine$double.eps * 100,
  ...
)

Exv.VRSa(
  Sigma,
  n = 100,
  Lambda,
  drop_0 = FALSE,
  tol = .Machine$double.eps * 100,
  ...
)

Exv.VRRa(
  Rho,
  n = 100,
  Lambda,
  tol = .Machine$double.eps * 100,
  tol.hg = 0,
  maxiter.hg = 2000,
  ...
)

Var.VESa(
  Sigma,
  n = 100,
  Lambda,
  drop_0 = FALSE,
  tol = .Machine$double.eps * 100,
  ...
)

Var.VRSa(
  Sigma,
  n = 100,
  Lambda,
  drop_0 = FALSE,
  tol = .Machine$double.eps * 100,
  ...
)

Var.VRRa(
  Rho,
  n = 100,
  Lambda,
  tol = .Machine$double.eps * 100,
  tol.hg = 0,
  maxiter.hg = 2000,
  ...
)

Arguments

Sigma

Population covariance matrix; assumed to be validly constructed.

n

Degrees of freedom (not sample sizes); numeric of length 1 or more.

Lambda

Numeric vector of population eigenvalues.

drop_0

Logical, when TRUE, eigenvalues smaller than tol are dropped.

tol

For covariance-related functions, this is the tolerance/threshold to be used with drop_0. For correlation-related functions, this is passed to Exv.r2() along with other arguments.

...

In Var.VRR(), additional arguments are passed to an internal function which it in turn calls. Otherwise ignored.

Rho

Population correlation matrix; assumed to be validly constructed (although simple checks are done).

tol.hg, maxiter.hg

Passed to Exv.r2(); see description of that function.

Details

Usage is identical to that of the corresponding unadjusted versions (see Exv.VXX), which are in most cases called internally.

Value

A numeric vector of the desired moment, corresponding to n.

References

Watanabe, J. (2022) Statistics of eigenvalue dispersion indices: quantifying the magnitude of phenotypic integration. Evolution, 76, 4–28. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/evo.14382")}.

See Also

VXXa for “bias-corrected” estimators

Exv.VXX for moments of unajusted versions

Examples

# See also examples of Exv.VXX
# Covariance matrix
N <- 20
Lambda <- c(4, 2, 1, 1)
(Sigma <- GenCov(evalues = Lambda, evectors = "random"))
VE(S = Sigma)$VE
VE(S = Sigma)$VR
# Population values of V(Sigma) and Vrel(Sigma)

# Moments of bias-corrected eigenvalue variance of covariance matrix
Exv.VESa(Sigma, n = N - 1)
Var.VESa(Sigma, n = N - 1)
# The expectation is equal to the population value (as it should be)

# Moments of adjusted relative eigenvalue variance of covariance matrix
Exv.VRSa(Sigma, n = N - 1)
Var.VRSa(Sigma, n = N - 1)
# Slight underestimation is expected
# All these are the same with Lambda = Lambda is specified instead of Sigma.

# Correlation matrix
(Rho <- GenCov(evalues = Lambda / sum(Lambda) * 4, evectors = "Givens"))
VE(S = Rho)$VR
# Population value of Vrel(Rho), identical to Vrel(Sigma) as it should be

Exv.VRRa(Rho, n = N - 1)
Var.VRRa(Rho, n = N - 1)
# Slight underestimation is expected
# These results vary with the choice of eigenvalues
# If interested, repeat from the definition of Rho

# All options for Var.VRR() are accommodated
Var.VRRa(Rho, n = N - 1, fun = "pfd") # Pan-Frank method; default
Var.VRRa(Rho, n = N - 1, fun = "klv") # Konishi's theory


watanabe-j/eigvaldisp documentation built on Dec. 8, 2023, 4:38 a.m.