set.seed(1)
test = FALSE
if(test){
obj= sim_ClaDS( lambda_0=0.1,
mu_0=0.5,
sigma_lamb=0.7,
alpha_lamb=0.90,
condition="taxa",
taxa_stop = 20,
prune_extinct = TRUE)
tree = obj$tree
speciation_rates = obj$lamb[obj$rates]
extinction_rates = obj$mu[obj$rates]
data("ClaDS0_example")
# extract the Maximum A Posteriori for each of the parameters
MAPS = getMAPS_ClaDS0(ClaDS0_example$tree,
ClaDS0_example$Cl0_chains,
thin = 10)
# plot the simulated (on the left) and inferred speciation rates (on the right)
# on the same color scale
plot_ClaDS_phylo(ClaDS0_example$tree,
ClaDS0_example$speciation_rates,
MAPS[-(1:3)])
}
Run the code above in your browser using DataLab