ace(x, phy, type = "continuous", method = "ML", CI = TRUE,
model = if (type == "continuous") "BM" else "ER",
scaled = TRUE, kappa = 1, corStruct = NULL)
"phylo"
."continuous"
or
"discrete"
(or an abbreviation of these)."ML"
, "pic"
,
or "GLS"
.method
= "GLS"
), or a numeric matrix if type = "discrete"
(see
details).method = "pic"
).method = "GLS"
, specifies the correlation
structure to be used (this also gives the assumed model).type = "continuous"
, the estimates of the
ancestral character values.type = "continuous"
, the estimated 95%
confidence intervals.type = "continuous"
, model = "BM"
, and
method = "ML"
, the maximum likelihood estimate of the
Brownian parameter.type = "discrete"
, the maximum likelihood
estimates of the transition rates.method = "ML"
, the maximum log-likelihood.type = "discrete"
, the scaled likelihoods of
each ancestral state.type = "continuous"
, the default model is Brownian motion
where characters evolve randomly following a random walk. This model
can be fitted by maximum likelihood (the default, Schluter et
al. 1997), least squares (method = "pic"
, Felsenstein 1985), or
generalized least squares (method = "GLS"
, Martins and Hansen
1997). In the latter case, the specification of phy
and
model
are actually ignored: it is instead given through a
correlation structure with the option corStruct
. For discrete characters (type = "discrete"
), only maximum
likelihood estimation is available (Pagel 1994). The model is
specified through a numeric matrix with integer values taken as
indices of the parameters. The numbers of rows and of columns of this
matrix must be equal, and are taken to give the number of states of
the character. For instance, matrix(c(0, 1, 1, 0), 2)
will
represent a model with two character states and equal rates of
transition, matrix(c(0, 1, 2, 0), 2)
a model with unequal
rates, matrix(c(0, 1, 1, 1, 0, 1, 1, 1, 0), 3)
a model with
three states and equal rates of transition (the diagonal is always
ignored). There are short-cuts to specify these models: "ER"
is
an equal-rates model (e.g., the first and third examples above),
"ARD"
is an all-rates-different model (the second example), and
"SYM"
is a symmetrical model (e.g., matrix(c(0, 1, 2, 1,
0, 3, 2, 3, 0), 3)
). If a short-cut is used, the number of states
if determined from the data.
Martins, E. P. and Hansen, T. F. (1997) Phylogenies and the comparative method: a general approach to incorporating phylogenetic information into the analysis of interspecific data. American Naturalist, 149, 646--667.
Pagel, M (1994) Detecting correlated evolution on phylogenies: a general method for the comparative analysis of discrete characters. Proceedings of the Royal Society of London. Series B. Biological Sciences, 255, 37--445.
Schluter, D., Price, T., Mooers, A. O. and Ludwig, D. (1997) Likelihood of ancestor states in adaptive radiation. Evolution, 51, 1699--1711.
corBrownian
, corGrafen
,
corMartins
, compar.ou
### Just some random data...
data(bird.orders)
x <- rnorm(23)
### Compare the three methods for continuous characters:
ace(x, bird.orders)
ace(x, bird.orders, method = "pic")
ace(x, bird.orders, method = "GLS",
corStruct = corBrownian(1, bird.orders))
### For discrete characters:
ans <- ace(c(rep(0, 5), rep(1, 18)), bird.orders, type = "d")
#### Showing he likelihood of state "1" on each node:
plot(bird.orders, type = "c", FALSE)
nodelabels(thermo = ans$lik.anc[, 2], cex = 0.75)
Run the code above in your browser using DataLab