A test on tree data that either rejects the Yule of the PDA model. The test is based on the ratio of the likelihood of the PDA model to the likelihood of the Yule model (shape.statistic). The less balanced the tree is the larger its shape statistic is. The alternative "less" should be used to test whether the tree is less unbalanced than predicted by the null model. The alternative "greater" should be used to test whether the tree is more unbalanced than predicted by the null model.
Under the Yule model, the test statistic has approximate Gaussian distribution of \(mean = 1.204*n-\log{n-1}-2\) and \(variance = 0.168*n-0.710\), where \(n\) is the number of tips of the tree. The Gaussian approximation is accurate for n greater than 20.
Under the PDA model, the test statistic has approximate Gaussian distribution of \(mean \sim 2.03*n-3.545*\sqrt{n-1}\) and \(variance \sim 2.45*(n-1)*\log{n-1}\), where \(n\) is the number of tips of the tree. The Gaussian approximation is however accurate for very large n (n greater than 10000(?)). The values of the means and variances have been obtained from an analogy with binary search tree models in computer science.
The function includes corrections for small sizes under the PDA model, and uses empirical values of variances estimated throught Monte Carlo replicates as follows $$variance \sim 1.570*n*\log{n}-5.674*n+3.602*\sqrt{n}+14.915$$