1 \name{diversity.contrast.test}
2 \alias{diversity.contrast.test}
3 \title{Diversity Contrast Test}
5 This function performs the diversity contrast test comparing pairs of
9 diversity.contrast.test(x, method = "ratiolog",
10 alternative = "two.sided", nrep = 0, ...)
13 \item{x}{a matrix or a data frame with at least two columns: the first
14 one gives the number of species in clades with a trait supposed to
15 increase or decrease diversification rate, and the second one the number of
16 species in the sister-clades without the trait. Each
17 row represents a pair of sister-clades.}
18 \item{method}{a character string specifying the kind of test: \code{"ratiolog"} (default),
19 \code{"proportion"}, \code{"difference"}, or any unambiguous
20 abbreviation of these.}
21 \item{alternative}{a character string defining the alternative
22 hypothesis: \code{"two.sided"} (default), \code{"less"},
23 \code{"greater"}, or any unambiguous abbreviation of these.}
24 \item{nrep}{the number of replications of the randomization test; by
25 default, a Wilcoxon test is done.}
26 \item{\dots}{arguments passed to the function \code{\link[stats]{wilcox.test}}.}
29 If \code{method = "ratiolog"}, the test described in Barraclough et
30 al. (1996) is performed. If \code{method = "proportion"}, the version
31 in Barraclough et al. (1995) is used. If \code{method = "difference"},
32 then this is Wiegmann et al.'s (1993) version. Vamosi and Vamosi (2005)
33 gave a detailed account of these three tests which are essentially
34 different versions of the same test.
36 If \code{nrep = 0}, a Wilcoxon test is done on the species diversity
37 contrasts with the null hypothesis is that they are distributed around
38 zero. If \code{nrep > 0}, a randomization procedure is done where the
39 signs of the diversity contrasts are randomly chosen. This is used to
40 create a distribution of the test statistic which is compared with the
41 observed value (the sum of the diversity contrasts).
44 a single numeric value with the \emph{P}-value.
47 Barraclough, T. G., Harvey, P. H. and Nee, S. (1995) Sexual
48 selection and taxonomic diversity in passerine birds.
49 \emph{Proceedings of the Royal Society of London. Series B. Biological
50 Sciences}, \bold{259}, 211--215.
52 Barraclough, T. G., Harvey, P. H., and Nee, S. (1996) Rate of
53 \emph{rbc}L gene sequence evolution and species diversification in
54 flowering plants (angiosperms). \emph{Proceedings of the Royal Society
55 of London. Series B. Biological Sciences}, \bold{263}, 589--591.
57 Vamosi, S. M. and Vamosi, J. C. (2005) Endless tests: guidelines for
58 analysing non-nested sister-group comparisons. \emph{Evolutionary
59 Ecology Research}, \bold{7}, 567--579.
61 Wiegmann, B., Mitter, C. and Farrell, B. 1993. Diversification of
62 carnivorous parasitic insects: extraordinary radiation or specialized
63 dead end? \emph{American Naturalist}, \bold{142}, 737--754.
65 \author{Emmanuel Paradis}
67 \code{\link{slowinskiguyer.test}}, \code{\link{mcconwaysims.test}}
68 \code{\link{richness.yule.test}}
71 ### data from Vamosi & Vamosi (2005):
72 fleshy <- c(1, 1, 1, 1, 1, 3, 3, 5, 9, 16, 33, 40, 50, 100, 216, 393, 850, 947,1700)
73 dry <- c(2, 64, 300, 89, 67, 4, 34, 10, 150, 35, 2, 60, 81, 1, 3, 1, 11, 1, 18)
74 x <- cbind(fleshy, dry)
75 diversity.contrast.test(x)
76 diversity.contrast.test(x, alt = "g")
77 diversity.contrast.test(x, alt = "g", nrep = 1e4)
78 slowinskiguyer.test(x)