PhylogeneticH2: Phylogenetic Heritability

Description Usage Arguments Details Value Functions Note See Also Examples

Description

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.

Usage

1
2
3
4
5
6
7
alpha(H2, sigma, sigmae, t = Inf)

sigmaOU(H2, alpha, sigmae, t = Inf)

sigmae(H2, alpha, sigma, t = Inf)

H2e(z, sigmae, tree = NULL, tFrom = 0, tTo = Inf)

Arguments

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.

Details

The function sigmae uses the formula H2 = varOU(t, alpha, sigma) / (varOU(t, alpha, sigma) + sigmae^2)

Value

All functions return numerical values or NA, in case of invalid parameters

Functions

Note

This function is called sigmaOU and not simply sigma to avoid a conflict with a function sigma in the base R-package.

See Also

OU

Examples

 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

   

venelin/POUMM documentation built on Oct. 25, 2020, 12:07 a.m.