tess.likelihood.efbd: tess.likelihood.efbd: Probability density of a tree under a...

Description Usage Arguments Value Author(s) References Examples

View source: R/tess.likelihood.efbd.R

Description

tess.likelihood computes the probability of a reconstructed phylogenetic tree under time-dependent diversification rates. The rates may be any positive function of time or a constant. Additionally, mass-extinction event can be provided and a uniform taxon sampling probability. You have several options for the start of the process (origin vs MRCA) and the condition of the process (time, survival or taxa; note that survival and taxa implicitly condition on the time too!). Note that constant rates lead to much faster computations. The likelihood can be computed for incompletely sampled trees if you give a sampling probability != 1.0. You have two options for the sampling strategy: uniform|diversified. The detailed description of these can be found in the references. More information can be obtained in the vignette about how to apply this likelihood function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
tess.likelihood.efbd(nodes,
                     lambda,
                     mu,
                     phi,
                     rateChangeTimesLambda=c(),
                     rateChangeTimesMu=c(),
                     rateChangeTimesPhi=c(),
                     massExtinctionTimes=c(),
                     massExtinctionSurvivalProbabilities=c(),
                     samplingStrategy="uniform",
                     samplingProbability=1.0,
                     MRCA=TRUE,
                     CONDITION="survival",
                     log=TRUE)

Arguments

nodes

Information for each node, if it's a sampled ancestor, a fossil tip, or an extant tip. Also node age and parent ages Calculated using tess.branching.times(phy).

lambda

The speciation rate constant or vector.

mu

The extinction rate constant or vector.

phi

The fossilization rate constant or vector.

rateChangeTimesLambda

The speciation change times

rateChangeTimesMu

The extinction change times

rateChangeTimesPhi

The fossilization change times

massExtinctionTimes

The set of mass-extinction times after the start of the process.

massExtinctionSurvivalProbabilities

The set of survival probabilities for each speciation event. The set must have the same length as the set of mass-extinction times.

samplingProbability

The probability for a species to be included in the sample.

samplingStrategy

The strategy how samples were obtained. Options are: uniform|diversified|age.

MRCA

Does the process start with the most recent common ancestor? If not, the tree must have a root edge!

CONDITION

do we condition the process on time|survival|taxa?

log

Should we log-transform the likelihood?

Value

Returns the (log) probability of the tree, i.e. the likelihood of the parameters given the tree.

Author(s)

Sebastian Hoehna

References

S. Hoehna: Fast simulation of reconstructed phylogenies under global, time-dependent birth-death processes. 2013, Bioinformatics, 29:1367-1374

S. Hoehna: Likelihood Inference of Non-Constant Diversification Rates with Incomplete Taxon Sampling. 2014, PLoS one, Public Library of Science, 9, e84184.

S. Hoehna: The time-dependent reconstructed evolutionary process with a key-role for mass-extinction events. 2015, Journal of Theoretical Biology, 380, 321-331.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# load a test data set
data(cettiidae)

# convert the phylogeny into the branching times
times <- tess.branching.times(cettiidae)

## Set up some rate values
lambda <- c(1, 2, 1)
mu <- c(0.95, 0.5, 0.95)
phi <- c(0.1, 0.2, 0.1)

## Assign the times at which the rates change
changetimes <- c(0.5, 0.3)

## Calculate likelihood
tess.likelihood.efbd(times, lambda, mu, phi,
                     rateChangeTimesLambda = changetimes,
                     rateChangeTimesMu = changetimes,
                     rateChangeTimesPhi = changetimes)

hoehna/TESS documentation built on Feb. 3, 2022, 5:59 a.m.