conditionalG {evolvability}R Documentation

Computing a conditional sub-matrix of G

Description

conditinoalG calculates a conditional variance matrix.

Usage

conditionalG(G, condition_on = NULL)

Arguments

G

A variance matrix (must be symmetric and positive definite).

condition_on

Either an integer with the column number indicating which trait to condition on or a vector with several column numbers (integers).

Details

The function calculates a sub-matrix of G conditional on the traits defined by the the condition_on vector. The function is based on equation 3 in Hansen et al. (2003).

Value

A matrix that is a sub-matrix of the input matrix conditional on the non-included traits.

Author(s)

Geir H. Bolstad

References

Hansen TF, Armbruster WS, Carlsson ML & PĂ©labon C. 2003. Evolvability and genetic constraint in Dalechampia blossoms: genetic correlations and conditional evolvability. J. Exp. Zool. 296B:23-39.

Examples

# Constructing a G-matrix:
G <- matrix(c(
  1, 1, 0, 1,
  1, 2, 1, 1,
  0, 1, 2, 1,
  1, 1, 1, 3
), ncol = 4)

# Computing a conditional 2x2 sub-matrix by conditioning on
# trait 3 and 4:
G_sub_conditional <- conditionalG(G, condition_on = c(3, 4))
G_sub_conditional

# The average evolvabilities of this matrix can then be
# compared can than be compared to the average evolvabilities
# of the corresponding unconditional sub-matrix of G:
evolvabilityMeans(G_sub_conditional)
evolvabilityMeans(G[-c(3, 4), -c(3, 4)])

[Package evolvability version 2.0.0 Index]