Learn R Programming

expoTree (version 1.0.1)

infExpoTree: 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.

Usage

infExpoTree(pars,times,ttypes,survival=TRUE,vflag=0,root.lineages=0)

Arguments

pars
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.

Value

Likelihood

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.

References

Tanja Stadler, Journal of Theoretical Biology, 2010

See Also

expoTree

Examples

Run this code
  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)

Run the code above in your browser using DataLab