]> git.donarmstrong.com Git - ape.git/blob - man/sh.test.Rd
current 2.1 release
[ape.git] / man / sh.test.Rd
1 \name{sh.test}
2 \alias{sh.test}
3 \title{Shimodaira-Hasegawa Test}
4 \usage{
5 sh.test(..., x, model = DNAmodel(), B = 100)
6 }
7 \arguments{
8   \item{...}{either a series of objects of class \code{"phylo"}
9     separated by commas, or a list containing such objects.}
10   \item{x}{a list, a matrix, or a data frame containing the (aligned)
11     DNA sequences.}
12   \item{model}{the model to be fitted to each tree (as an object of
13     \code{"DNAmodel"}).}
14   \item{B}{the number of bootstrap replicates.}
15 }
16 \description{
17   This function computes the Shimodaira--Hasegawa test for a set of
18   trees.
19 }
20 \details{
21   The present implementation follows the original formulation of
22   Shimodaira and Hasegawa (1999). A difference is that the bootstrap
23   resampling is done on the original sequence data rather than the RELL
24   method as sugested by Shimodaira and Hasegawa.
25 }
26 \value{
27   a numeric vector with the P-value associated with each tree given in
28   \code{...}.
29 }
30 \references{
31   Shimodaira, H. and Hasegawa, M. (1999) Multiple comparisons of
32   log-likelihoods with applications to phylogenetic
33   inference. \emph{Molecular Biology and Evolution}, \bold{16},
34   1114--1116.
35 }
36 \author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
37 \seealso{
38   \code{\link{mlphylo}}, \code{\link{DNAmodel}}
39 }
40 \examples{
41 data(woodmouse)
42 t1 <- nj(dist.dna(woodmouse))
43 t2 <- rtree(15, tip.label = t1$tip.label)
44 t3 <- rtree(15, tip.label = t1$tip.label)
45 ### Are the NJ tree and two random tress significantly different?
46 \dontrun{sh.test(t1, t2, t3, x = woodmouse, B = 100)}
47 }
48 \keyword{models}