Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates the density dependent likelihood of a phylogenetic tree. It takes branching and sampling times as an argument and integrates the likelihoood function over the whole tree.
1 2 | runExpoTree(pars,times,ttypes,survival=TRUE,shifts=NULL,vflag=0,
return.full=FALSE,rescale=TRUE,root.lineages=0)
|
pars |
Matrix of parameters. If the number of columns is larger than 5, only the first 5 columns are used. Each row is of the form c(N,beta,mu,psi,rho). The rows correspond to rate shifts. |
times |
Vector of event times. |
ttypes |
Vector of event types. |
survival |
Condition on the likelihood of observing the tree. |
shifts |
Times of rate shifts. |
vflag |
Verbosity level. |
return.full |
Return full probability vector rather than just the entry for I=1. |
rescale |
Rescale probability vector in the calculation. Avoids some numerical issues. |
root.lineages |
Number of lineages that are extant at the 'root' of the tree. |
Parameter matrix:
N = Total population size. Must be at least the maximal number of extant lineages at any given time.
beta = Branching rate. For epidemic trees, this is the infection rate. For species trees, this is the speciation rate.
mu = Extinction rate. For epidemic trees, this is the death/recovery rate. For species trees, this is the extinction rate.
psi = Sampling rate.
rho = Initial sampling rate.
Log-Likelihood or vector of log-likelihoods.
Gabriel E Leventhal
Leventhal, Guenthard, Bonhoeffer & Stadler, 2013
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.