Last chance! 50% off unlimited learning
Sale ends in
The Beta statistic fits a beta splitting model to each node,
assuming that the number of extant descendents of each daughter branch is
split following a beta distribution, such that the number of extant
descendentants x and y at a node follows
beta_statistic(
phy,
upper_lim = 10,
algorithm = "COBYLA",
abs_tol = 1e-04,
rel_tol = 1e-06
)
Beta value
phylogeny or ltable
Upper limit for beta parameter, default = 10.
optimization algorithm used, default is "COBYLA" (Constrained Optimization BY Linear Approximations), also available are "subplex" and "simplex". Subplex and Simplex seem to have difficulties with unbalanced trees, e.g. if beta < 0.
absolute stopping criterion of optimization. Default is 1e-4.
relative stopping criterion of optimization. Default is 1e-6.
Aldous, David. "Probability distributions on cladograms." Random discrete structures. Springer, New York, NY, 1996. 1-18. Jones, Graham R. "Tree models for macroevolution and phylogenetic analysis." Systematic biology 60.6 (2011): 735-746.
simulated_tree <- ape::rphylo(n = 100, birth = 1, death = 0)
balanced_tree <- treestats::create_fully_balanced_tree(simulated_tree)
unbalanced_tree <- treestats::create_fully_unbalanced_tree(simulated_tree)
beta_statistic(balanced_tree) # should be approximately 10
beta_statistic(simulated_tree) # should be near 0
beta_statistic(unbalanced_tree) # should be approximately -2
Run the code above in your browser using DataLab