|
1 | 1 | #' Aldous' beta statistic. |
2 | 2 | #' @description The Beta statistic fits a beta splitting model to each node, |
3 | | -#' assuming that the number of extantdescendents of each daughter branch is |
| 3 | +#' assuming that the number of extantdescendants of each daughter branch is |
4 | 4 | #' split following a beta distribution, such that the number of extant |
5 | | -#'descendentants x and y at a node follows \eqn{q(x, y) = s_n(beta)^-1 |
| 5 | +#'descendants x and y at a node follows \eqn{q(x, y) = s_n(beta)^-1 |
6 | 6 | #' \frac{(gamma(x + 1 + beta)gamma(y + 1 + beta))}{gamma(x+1)gamma(y+1)}}, where |
7 | 7 | #' \eqn{s_n(beta)^-1} is a normalizing constant. When this model is fit to a |
8 | 8 | #' tree, different values of beta correspond to the expectation following from |
@@ -40,7 +40,8 @@ beta_statistic <- function(phy, |
40 | 40 | rel_tol=1e-6) { |
41 | 41 | check_tree(phy, |
42 | 42 | require_binary=TRUE, |
43 | | -require_ultrametric=FALSE) |
| 43 | +require_ultrametric=FALSE, |
| 44 | +require_rooted=TRUE) |
44 | 45 |
|
45 | 46 | if (inherits(phy,"matrix")) { |
46 | 47 | beta_stat<- calc_beta_ltable_cpp(phy,upper_lim, |
|