covPOUMM {POUMM} | R Documentation |
Expected covariance of two tips at given root-tip time and phylogenetic distance
Description
Expected covariance of two tips at given root-tip time and phylogenetic distance
Usage
covPOUMM(
alpha,
sigma,
sigmae,
t,
tau,
tanc = t - tau/2,
corr = FALSE,
as.matrix = FALSE
)
Arguments
alpha , sigma , sigmae |
POUMM parameters |
t |
A non-negative number or vector time from the beginning of the POUMM process (root-tip distance). If a vector, the evaluation is done on each couple (row) from cbind(t, tau). |
tau |
A non-negative number or vector indicating the phylogenetic distance between two tips, each of them located at time t from the root. If a vector, the evaluation is done on each couple (row) from cbind(t, tau). |
tanc |
A non-negative number or vector indication the root-mrca distance for a couple of tips. Defaults to t-tau/2 corresponding to an ultrametric tree. |
corr |
Logical indicating whether correlation should be returned instead of covariance. |
as.matrix |
Logical indicating if a variance-covariance matrix should be returned. |
Details
The function assumes that the two tips are at equal distance t from the root. This implies that the root-tip distance of their mrca is t - tau/2.
Value
If as.matrix == FALSE, a number. Otherwise a two by two symmetric matrix. If t or tau is a vector of length bigger than 1, then a vector of numbers or a list of matrices.