3 \title{Most Parsimonious Reconstruction}
5 This function does ancestral character reconstruction by parsimony as
6 described in Hanazawa et al. (1995) and modified by Narushima and
13 \item{x}{a vector of integers.}
14 \item{phy}{an object of class \code{"phylo"}; the tree must be
15 unrooted and fully dichotomous.}
16 \item{outgroup}{an integer or a character string giving the tip of
17 \code{phy} used as outgroup.}
20 Hanazawa et al. (1995) and Narushima and Hanazawa (1997) used Farris's
21 (1970) and Swofford and Maddison's (1987) framework to reconstruct
22 ancestral states using parsimony. The character is assumed to take
23 integer values. The algorithm finds the sets of values for each node
24 as intervals with lower and upper values.
26 It is recommended to root the tree with the outgroup before the
27 analysis, so plotting the values with \code{\link{nodelabels}} is
31 a matrix of integers with two columns named ``lower'' and ``upper''
32 giving the lower and upper values of the reconstructed sets for each
36 Farris, J. M. (1970) Methods for computing Wagner trees.
37 \emph{Systematic Zoology}, \bold{19}, 83--92.
39 Hanazawa, M., Narushima, H. and Minaka, N. (1995) Generating most
40 parsimonious reconstructions on a tree: a generalization of the
41 Farris--Swofford--Maddison method. \emph{Discrete Applied
42 Mathematics}, \bold{56}, 245--265.
44 Narushima, H. and Hanazawa, M. (1997) A more efficient algorithm for
45 MPR problems in phylogeny. \emph{Discrete Applied Mathematics},
48 Swofford, D. L. and Maddison, W. P. (1987) Reconstructing ancestral
49 character states under Wagner parsimony. \emph{Mathematical
50 Biosciences}, \bold{87}, 199--229.
51 }\author{Emmanuel Paradis}
53 \code{\link{ace}}, \code{\link{root}}, \code{\link{nodelabels}}
56 ## the example in Narushima and Hanazawa (1997):
57 tr <- read.tree(text = "(((i,j)c,(k,l)b)a,(h,g)e,f)d;")
58 x <- c(1, 3, 0, 6, 5, 2, 4)
59 names(x) <- letters[6:12]
60 (o <- MPR(x, tr, "f"))
62 nodelabels(paste("[", o[, 1], ",", o[, 2], "]", sep = ""))
63 tiplabels(x[tr$tip.label], adj = -2)
66 tr <- rtree(30, rooted = FALSE)