]> git.donarmstrong.com Git - ape.git/blob - man/mcconwaysims.test.Rd
final packing for ape 2.7
[ape.git] / man / mcconwaysims.test.Rd
1 \name{mcconwaysims.test}
2 \alias{mcconwaysims.test}
3 \title{McConway-Sims Test of Homogeneous Diversification}
4 \description{
5   This function performs the McConway--Sims test that a trait or
6   variable does not affect diversification rate.
7 }
8 \usage{
9 mcconwaysims.test(x)
10 }
11 \arguments{
12   \item{x}{a matrix or a data frame with at least two columns: the first
13     one gives the number of species in clades with a trait supposed to
14     increase or decrease diversification rate, and the second one the number of
15     species in the sister-clades without the trait. Each
16     row represents a pair of sister-clades.}
17 }
18 \details{
19   The McConway--Sims test compares a series of sister-clades where one
20   of the two is characterized by a trait supposed to affect
21   diversification rate. The null hypothesis is that the trait does not
22   affect diversification. The alternative hypothesis is that
23   diversification rate is increased or decreased by the trait (by
24   contrast to the Slowinski--Guyer test). The test is a likelihood-ratio
25   of a null Yule model and an alternative model with two parameters.
26 }
27 \value{
28   a data frame with the \eqn{\chi^2}{chi2}, the number of degrees of
29   freedom, and the \emph{P}-value.
30 }
31 \references{
32   McConway, K. J. and Sims, H. J. (2004) A likelihood-based method for
33   testing for nonstochastic variation of diversification rates in
34   phylogenies. \emph{Evolution}, \bold{58}, 12--23.
35 }
36 \author{Emmanuel Paradis}
37 \seealso{
38   \code{\link{balance}}, \code{\link{slowinskiguyer.test}},
39   \code{\link[geiger]{rc}} in \pkg{geiger},
40   \code{\link[apTreeshape]{shift.test}} in \pkg{apTreeshape}
41 }
42 \examples{
43 ### simulate 10 clades with lambda = 0.1 and mu = 0.09:
44 n0 <- replicate(10, balance(rbdtree(.1, .09, Tmax = 35))[1])
45 ### simulate 10 clades with lambda = 0.15 and mu = 0.1:
46 n1 <- replicate(10, balance(rbdtree(.15, .1, Tmax = 35))[1])
47 x <- cbind(n1, n0)
48 mcconwaysims.test(x)
49 slowinskiguyer.test(x)
50 richness.yule.test(x, 35)
51 }
52 \keyword{htest}