anc.Bayes(tree, x, ngen=10000, control=list())
"phylo"
.names(x)
should be the species names.sig2
: starting value for $\sigma^2$ (BM rate); a
: starting for the state at the root node; y
: starting values for the states at all internal nodes exclungen/sample+1
containing the posterior sample and likelihoods. Matrix columns are labeled either sig2
or by the node number of the internal node.ace
, anc.ML
, anc.trend
, evol.rate.mcmc
, fastAnc
tree<-rtree(50)
x<-fastBM(tree,sig2=2) # simulate using fastBM
X<-anc.Bayes(tree,x,ngen=10000) # sample ancestral states
estimates<-colMeans(X[21:nrow(X),]) # get estimates, excluding burnin
Run the code above in your browser using DataLab