data(Balaenopteridae)
tot_time<-max(node.age(Balaenopteridae)$ages)
# Fit the pure birth model (no extinction) with exponential variation of the speciation rate
# with time
f.lamb <-function(t,y){y[1] * exp(y[2] * t)}
f.mu<-function(t,y){0}
lamb_par<-c(0.08, 0.01)
mu_par<-c()
result <- fit_bd(Balaenopteridae,tot_time,f.lamb,f.mu,lamb_par,mu_par,f=1,
expo.lamb = TRUE, fix.mu=TRUE)
# plot estimated number of species through time
# plot_dtt(result, tot_time, N0=9)
Run the code above in your browser using DataLab