BiSSE

What it does. BiSSE (Binary State Speciation and Extinction) is a likelihood-based method implemented in the diversitree R package. It fits a model in which speciation and extinction rates depend on the state of a binary trait evolving on a phylogeny, and simultaneously estimates trait transition rates. The model parameters are: two speciation rates (λ₀, λ₁), two extinction rates (μ₀, μ₁), and two transition rates between states (q₀₁, q₁₀).

When to use it.

When NOT to use it.

Worked example

library(diversitree)

# tree: time-calibrated phylo object (ape format)
# states: named integer vector, 0/1, names matching tree$tip.label

# 1. Build the BiSSE likelihood function
lik <- make.bisse(tree, states)

# 2. Find ML estimates starting from reasonable initial values
p0 <- starting.point.bisse(tree)
fit.ml <- find.mle(lik, p0)
coef(fit.ml)   # lambda0, lambda1, mu0, mu1, q01, q10

# 3. Test whether lambda0 == lambda1 (no state-dependent speciation)
lik.constrained <- constrain(lik, lambda0 ~ lambda1)
fit.null <- find.mle(lik.constrained, p0[-2])
anova(fit.ml, fit.null)   # LRT: Df=1; be skeptical if tree < 300 tips

# 4. Bayesian MCMC for full posterior
prior <- make.prior.exponential(1 / (2 * (length(tree$tip.label) - 1) / max(branching.times(tree))))
post  <- mcmc(lik, coef(fit.ml), nsteps = 10000, prior = prior, w = 0.1)

# 5. Summarise posterior — compare speciation rates by state
library(coda)
post_rates <- as.mcmc(post[-(1:2000), c("lambda0", "lambda1")])
summary(post_rates)
plot(post_rates)

Gotchas we’ve hit

Key papers that use this method in the lab

Question copied. Paste it into the NotebookLM tab.