R: Likelihood calculation without density dependence.
infExpoTree
R Documentation
Likelihood calculation without density dependence.
Description
Calculates the likelihood of a phylogenetic tree without density dependence.
It takes branching and sampling times as an argument and integrates the
likelihoood function over the whole tree.
Vector of parameters. pars = (beta,mu,psi,rho). See 'Details'.
times
Vector of event times.
ttypes
Vector of event types.
survival
Condition on survival of the tree.
vflag
Set verbosity level.
root.lineages
Number of lineages that are extant at the 'root' of the tree.
Details
The parameters are:
- 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.
Value
Likelihood
Author(s)
Gabriel E Leventhal
References
Tanja Stadler, Journal of Theoretical Biology, 2010
See Also
expoTree
Examples
times <- cumsum(runif(10))
ttypes <- rep(1,10)
N <- 15
beta <- 1
mu <- 0.1
psi <- 0
rho <- 1
lik <- infExpoTree(beta,mu,psi,rho,times,ttypes)