View source: R/likelihood_coal_var.R
likelihood_coal_var | R Documentation |
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 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 |
Time runs from the present to the past. Hence, a positive alpha (for example) means that the speciation rate declines from past to present.
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 |
H Morlon
Morlon, H., Potts, M.D., Plotkin, J.B. (2010) Inferring the dynamics of diversification: a coalescent approach, PLoS B 8(9): e1000493
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.