Likelihood of a birth-death model using a coalescent approch
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.
likelihood_coal_var(Vtimes, ntips, lamb0, alpha, mu0, beta, N0, pos = TRUE)
Vtimes
: a vector of branching times (sorted from present to past)ntips
: number of species in the phylogenylamb0
: the speciation rate at presentalpha
: the parameter controlling the exponential variation in speciation rate.mu0
: the extinction rate at presentbeta
: the parameter controlling the exponential variation in extinction rate.N0
: the number of extanct speciespos
: logical: should be set to FALSE only to not enforce positive speciation and extinction ratessa list containing the following components: - res: the loglikelihood value of the phylogeny, given the parameters
Time runs from the present to the past. Hence, a positive alpha (for example) means that the speciation rate declines from past to present.
Morlon, H., Potts, M.D., Plotkin, J.B. (2010) Inferring the dynamics of diversification: a coalescent approach, PLoS B 8(9): e1000493
H Morlon
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)