likelihood_coal_var {RPANDA}R Documentation

Likelihood of a birth-death model using a coalescent approch

Description

Computes the likelihood of a phylogeny under the expanding diversity model with potentially time-varying rates and potentially missing extant species to a phylogeny. Notations follow Morlon et al. PloSB 2010.

Usage

likelihood_coal_var(Vtimes, ntips, lamb0, alpha, mu0, beta, N0, pos = TRUE)

Arguments

Vtimes

a vector of branching times (sorted from present to past)

ntips

number of species in the phylogeny

lamb0

the speciation rate at present

alpha

the parameter controlling the exponential variation in speciation rate.

mu0

the extinction rate at present

beta

the parameter controlling the exponential variation in extinction rate.

N0

the number of extanct species

pos

logical: should be set to FALSE only to not enforce positive speciation and extinction ratess

Details

Time runs from the present to the past. Hence, a positive alpha (for example) means that the speciation rate declines from past to present.

Value

a list containing the following components:

res

the loglikelihood value of the phylogeny, given the parameters

all

vector of all the individual loglikelihood values corresponding to each branching event

Author(s)

H Morlon

References

Morlon, H., Potts, M.D., Plotkin, J.B. (2010) Inferring the dynamics of diversification: a coalescent approach, PLoS B 8(9): e1000493

Examples

data(Cetacea)
Vtimes <- sort(branching.times(Cetacea))
lamb0 <- 0.1
alpha <- 0.001
mu0<-0
beta<-0
ntips <- Ntip(Cetacea)
N0 <- 89
likelihood <- likelihood_coal_var(Vtimes, ntips, lamb0, alpha, mu0, beta, N0)

[Package RPANDA version 2.3 Index]