Description Usage Arguments Details Value Functions Note See Also Examples
The phylogenetic heritability, H^2, is defined as the ratio of the genetic variance over the total phenotypic variance expected at a given evolutionary time t (measured from the root of the tree). Thus, the phylogenetic heritability connects the parameters alpha, sigma and sigmae of the POUMM model through a set of equations. The functions described here provide an R-implementation of these equations.
1 2 3 4 5 6 7 |
H2 |
Phylogenetic heritability at time t. |
sigmae |
Numeric, environmental phenotypic deviation at the tips. |
t |
Numeric value denoting evolutionary time (i.e. distance from the root of a phylogenetic tree). |
alpha, sigma |
Numeric values or n-vectors, parameters of the OU process; alpha and sigma must be non-negative. A zero alpha is interpreted as the Brownian motion process in the limit alpha -> 0. |
z |
Numerical vector of observed phenotypes. |
tree |
A phylo object. |
tFrom, tTo |
Numerical minimal and maximal root-tip distance to limit the calculation. |
The function sigmae uses the formula H2 = varOU(t, alpha, sigma) / (varOU(t, alpha, sigma) + sigmae^2)
All functions return numerical values or NA, in case of invalid parameters
alpha
: Calculate alpha given time t, H2, sigma and sigmae
sigmaOU
: Calculate sigma given time t, H2 at time t, alpha
and sigmae
sigmae
: Calculate sigmae given alpha, sigma, and H2 at
time t
H2e
: "Empirical" phylogenetic heritability estimated
from the empirical variance of the observed phenotypes and sigmae
This function is called sigmaOU and not simply sigma to avoid a conflict with a function sigma in the base R-package.
OU
1 2 3 4 5 6 7 8 9 10 11 12 13 | # At POUMM stationary state (equilibrium, t=Inf)
H2 <- H2(alpha = 0.75, sigma = 1, sigmae = 1, t = Inf) # 0.4
alpha <- alpha(H2 = H2, sigma = 1, sigmae = 1, t = Inf) # 0.75
sigma <- sigmaOU(H2 = H2, alpha = 0.75, sigmae = 1, t = Inf) # 1
sigmae <- sigmae(H2 = H2, alpha = 0.75, sigma = 1, t = Inf) # 1
# At finite time t = 0.2
H2 <- H2(alpha = 0.75, sigma = 1, sigmae = 1, t = 0.2) # 0.1473309
alpha <- alpha(H2 = H2, sigma = 1, sigmae = 1, t = 0.2) # 0.75
sigma <- sigmaOU(H2 = H2, alpha = 0.75, sigmae = 1, t = 0.2) # 1
sigmae <- sigmae(H2 = H2, alpha = 0.75, sigma = 1, t = 0.2) # 1
|
Loading required package: Rcpp
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.