fits the bds model
fit_bds(
phy,
sampling_fraction,
lambda_hat,
mu_hat,
eta,
num_speciation_classes = 6,
num_extinction_classes = 6,
sd = 0.587,
tol = 1e-06,
condition_survival = TRUE,
condition_root_speciation = TRUE,
condition_marginal = FALSE,
extinction_approximation = FALSE,
verbose = FALSE,
numthreads = 0
)a list with three items: $model (the parameter estimates), $td (a tidytree object with branch-rate estimates), and $tip_rates (a data frame of the tip rates)
an object of type phylo
the probability that each species was sampled in the tree
the overall scale of the log-normal base distribution for the speciation rates. If not specified, the function will estimate it using ML
the overall scale of the log-normal base distribution for the extinction rates. If not specified, the function will estimate it using ML
the shift rate parameter. If not specified, the function will estimate it using ML
the number of speciation rate class discretizations, such that rate categories is k = n_sp * n_mu
the number of extinction rate class discretizations, such that rate categories is k = n_sp * n_mu
the spread parameter for the log-normal base distribution
the local error threshold in the numerical ODE solver (per delta_t time step)
whether or not to condition on the survival of the left and right lineages descending from the root (default TRUE)
whether or not to condition on that there was a speciation event at the root node (default TRUE)
whether or condition using the marginal or per-category approach (default FALSE, i.e., to condition per rate category)
whether or not to approximate the extinction probability calculations, by assuming that rate shift events are not allowed on extinct lineages (default FALSE)
whether or not to print more information
how many threads to use in likelihood calculation. If 0, then the program uses all available cores
data("primates")
analysis <- fit_bds(primates, sampling_fraction = 0.6, numthreads = 2)
Run the code above in your browser using DataLab