Description Usage Arguments Details Value Author(s) References Examples
View source: R/evolvabilityMeansMCMC.R
evolvabilityMeans
calculates the average (unconditional) evolvability
(e), respondability (r), conditional evolvability (c), autonomy (a) and
integration (i) given the posterior distribution of a additive-genetic
variance matrix using the approximation formulas described in Hansen and
Houle (2008, 2009).
1 | evolvabilityMeansMCMC(G_mcmc)
|
G_mcmc |
the posterior distribution of a variance matrix in the form of
a table. Each row in the table must be one iteration of the posterior
distribution (or bootstrap distribution). Each iteration of the matrix must
be on the form as given by |
The equations for calculating the evolvability parameters are
approximations, except for the minimum, maximum and unconditional
evolvability which are exact. The bias of the approximations depends on the
dimensionality of the G-matrix, with higher bias for few dimensions (see
Hansen and Houle 2008). For low dimensional G-matrices, we recommend
estimating the averages of the evolvability parameters using
evolavbilityBetaMCMC
over many random selection gradients (
randomBeta
). The maximum and minimum evolvability, which
are also the maximum and minimum respondability and conditional
evolvability, equals the largest and smallest eigenvalue of the G-matrix,
respectively.
An object of class
'evolvabilityMeansMCMC'
, which is a
list with the following components:
post.dist | The posterior distribution of the average evolvability parameters. | |||
post.medians | The posterior medians and HPD interval of the average evolvability parameters. |
Geir H. Bolstad
Hansen, T. F. & Houle, D. (2008) Measuring and comparing evolvability and
constraint in multivariate characters. J. Evol. Biol. 21:1201-1219.
Hansen, T. F. & Houle, D. (2009) Corrigendum. J. Evol. Biol. 22:913-915.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # Simulating a posterior distribution
# (or bootstrap distribution) of a G-matrix:
G <- matrix(c(1, 1, 0, 1, 4, 1, 0, 1, 2), ncol = 3)
G_mcmc <- sapply(c(G), function(x) rnorm(10, x, 0.01))
G_mcmc <- t(apply(G_mcmc, 1, function(x) {
G <- matrix(x, ncol = sqrt(length(x)))
G[lower.tri(G)] <- t(G)[lower.tri(G)]
c(G)
}))
# Simulating a posterior distribution
# (or bootstrap distribution) of trait means:
means <- c(1, 1.4, 2.1)
means_mcmc <- sapply(means, function(x) rnorm(10, x, 0.01))
# Mean standardizing the G-matrix:
G_mcmc <- meanStdGMCMC(G_mcmc, means_mcmc)
# Estimating average evolvability paramters:
evolvabilityMeansMCMC(G_mcmc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.