Description Usage Arguments Details Value Author(s) References Examples
View source: R/calculate_genetree_summary_stat.R
Calculate cherry statistic according to the definition given in McKenzie and Steel 2000 (see below for reference)
1 | count_cherries(tree)
|
tree |
an object of class "phylo" |
This calculates the value for the cherry test statistic on a rooted tree. Note that this does not perform the actual hypothesis test against Yule or uniform tree models.
The value fo cherries on a tree
Emmanuel Paradis
McKenzie, A. and Steel, M. (2000) Distributions of cherries for two models of trees. Mathematical Biosciences, 164, 81–92.
1 2 3 4 5 6 7 8 | # first simulate a species tree
mu <- 0.5
lambda <- 1.0
nt <- 6
tr <- sim_stBD(sbr = lambda, sdr = mu, numbsim = 1, n_tips = nt)
treeducken::count_cherries(tr[[1]])
# to do the hypothesis test you can use the ape version of this function
ape::cherry(tr[[1]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.