Description Usage Arguments Details Value Note Author(s) References See Also Examples
Reconstruct the ancestral states at the root (and possibly for each nodes) of a phylogenetic tree from models fit obtained using the fit_t_XX
functions.
1 2 | ancestral(object)
|
object |
A model fit object obtained by the |
ancestral
is an S3 method that reconstruct the ancestral states at the root and possibly for each nodes of a phylogenetic tree from the models fit obtained by the fit_t_XX
class of functions (e.g., fit_t_pl
, fit_t_comp
and fit_t_env
). Ancestral states are estimated using generalized least squares (GLS; Martins & Hansen 1997, Cunningham et al. 1998 ).
a list with the following components
root |
the reconstructed ancestral states at the root |
nodes |
the reconstructed ancestral states at each nodes (not yet implemented for all the methods) |
The function is used internally in phyl.pca_pl
.
J. Clavel
Clavel, J., Aristide, L., Morlon, H., 2019. A Penalized Likelihood framework for high-dimensional phylogenetic comparative methods and an application to new-world monkeys brain evolution. Syst. Biol. 68: 93-116.
Cunningham C.W., Omland K.E., Oakley T.H. 1998. Reconstructing ancestral character states: a critical reappraisal. Trends Ecol. Evol. 13:361-366.
Martins E.P., Hansen T.F. 1997. Phylogenies and the comparative method: a general approach to incorporating phylogenetic information into the analysis of interspecific data. Am. Nat. 149:646-667.
fit_t_pl
,
fit_t_env
,
phyl.pca_pl
,
GIC
,
gic_criterion
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | if(require(mvMORPH)){
set.seed(1)
n <- 32 # number of species
p <- 31 # number of traits
tree <- pbtree(n=n) # phylogenetic tree
R <- Posdef(p) # a random symmetric matrix (covariance)
# simulate a dataset
Y <- mvSIM(tree, model="BM1", nsim=1, param=list(sigma=R))
# fit a multivariate BM with Penalized likelihood
fit <- fit_t_pl(Y, tree, model="BM", method="RidgeAlt")
# Perform the ancestral states reconstruction
anc <- ancestral(fit)
# retrieve the scores
head(anc$nodes)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.