]> git.donarmstrong.com Git - ape.git/blob - man/slowinskiguyer.test.Rd
final packing for ape 2.7
[ape.git] / man / slowinskiguyer.test.Rd
1 \name{slowinskiguyer.test}
2 \alias{slowinskiguyer.test}
3 \title{Slowinski-Guyer Test of Homogeneous Diversification}
4 \description{
5   This function performs the Slowinski--Guyer test that a trait or
6   variable does not increase diversification rate.
7 }
8 \usage{
9 slowinskiguyer.test(x, detail = FALSE)
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 diversification rate, and the second one the number of
15     species in the corresponding sister-clade without the trait. Each
16     row represents a pair of sister-clades.}
17   \item{detail}{if \code{TRUE}, the individual P-values are appended.}
18 }
19 \details{
20   The Slowinski--Guyer test compares a series of sister-clades where one
21   of the two is characterized by a trait supposed to increase
22   diversification rate. The null hypothesis is that the trait does not
23   affect diversification. If the trait decreased diversification rate,
24   then the null hypothesis cannot be rejected.
25
26   The present function has mainly a historical interest. The
27   Slowinski--Guyer test generally performs poorly: see McConway and Sims
28   (2004) for an alternative and the functions cited below.
29 }
30 \value{
31   a data frame with the \eqn{\chi^2}{chi2}, the number of degrees of
32   freedom, and the \emph{P}-value. If \code{detail = TRUE}, a list is
33   returned with the data frame and a vector of individual
34   \emph{P}-values for each pair of sister-clades.
35 }
36 \references{
37   McConway, K. J. and Sims, H. J. (2004) A likelihood-based method for
38   testing for nonstochastic variation of diversification rates in
39   phylogenies. \emph{Evolution}, \bold{58}, 12--23.
40
41   Slowinski, J. B. and Guyer, C. (1993) Testing whether certain traits
42   have caused amplified diversification: an improved method based on a
43   model of random speciation and extinction. \emph{American Naturalist},
44   \bold{142}, 1019--1024.
45 }
46 \author{Emmanuel Paradis}
47 \seealso{
48   \code{\link{balance}}, \code{\link{mcconwaysims.test}},
49   \code{\link{diversity.contrast.test}},
50   \code{\link{richness.yule.test}},
51   \code{\link[geiger]{rc}} in \pkg{geiger},
52   \code{\link[apTreeshape]{shift.test}} in \pkg{apTreeshape}
53 }
54 \examples{
55 ### from Table 1 in Slowinski and Guyer(1993):
56 viviparous <- c(98, 8, 193, 36, 7, 128, 2, 3, 23, 70)
57 oviparous <- c(234, 17, 100, 4, 1, 12, 6, 1, 481, 11)
58 x <- data.frame(viviparous, oviparous)
59 slowinskiguyer.test(x, TRUE) # 'P ~ 0.32' in the paper
60 xalt <- x
61 xalt[3, 2] <- 1
62 slowinskiguyer.test(xalt)
63 }
64 \keyword{htest}