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.
ancestral(object,...)
Arguments
object: A model fit object obtained by the fit_t_XX class of functions.
...: Further arguments to be passed through (not used yet).
Returns
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)
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 ).
Note
The function is used internally in phyl.pca_pl (Clavel et al. 2019).
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.
if(require(mvMORPH)){set.seed(1)n <-32# number of speciesp <-31# number of traitstree <- pbtree(n=n)# phylogenetic treeR <- Posdef(p)# a random symmetric matrix (covariance)# simulate a datasetY <- mvSIM(tree, model="BM1", nsim=1, param=list(sigma=R))# fit a multivariate BM with Penalized likelihoodfit <- fit_t_pl(Y, tree, model="BM", method="RidgeAlt")# Perform the ancestral states reconstructionanc <- ancestral(fit)# retrieve the scoreshead(anc$nodes)}