count_cherries: Calculate cherry statistic for gene-trees

Description Usage Arguments Details Value Author(s) References Examples

View source: R/calculate_genetree_summary_stat.R

Description

Calculate cherry statistic according to the definition given in McKenzie and Steel 2000 (see below for reference)

Usage

1

Arguments

tree

an object of class "phylo"

Details

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.

Value

The value fo cherries on a tree

Author(s)

Emmanuel Paradis

References

McKenzie, A. and Steel, M. (2000) Distributions of cherries for two models of trees. Mathematical Biosciences, 164, 81–92.

Examples

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]])

treeducken documentation built on March 3, 2021, 1:11 a.m.