ancestral {RPANDA} | R Documentation |
Estimation of traits ancestral states.
Description
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.
Usage
ancestral(object, ...)
Arguments
object |
A model fit object obtained by the |
... |
Further arguments to be passed through (not used yet). |
Details
ancestral
reconstructs 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 ).
Value
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) |
Note
The function is used internally in phyl.pca_pl
(Clavel et al. 2019).
Author(s)
J. Clavel
References
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.
See Also
fit_t_pl
,
fit_t_env
,
phyl.pca_pl
,
GIC
,
gic_criterion
Examples
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)
}