Ancestral character estimation under the threshold model using Bayesian MCMC
This function uses Bayesian MCMC to estimate ancestral states and thresholds for a discrete character under the threshold model from quantitative genetics (Felsenstein 2012).
ancThresh(tree, x, ngen=100000, sequence=NULL, method="mcmc",
model=c("BM","OU","lambda"), control=list(), ...)tree |
phylogenetic tree. |
x |
a named vector containing discrete character states; or a matrix containing the tip species, in rows, and probabilities of being in each state, in columns. |
ngen |
number of generations to run the MCMC. |
sequence |
assumed ordering of the discrete character state. If not supplied and |
method |
only method currently available is |
model |
model for the evolution of the liability. Options are |
control |
list containing the following elements: |
... |
additional arguments to be passed to |
print and plot S3 methods are now available for the object class "ancThresh".
This function returns an object of class "ancThresh" containing the posterior sample from our analysis, although with other components.
Liam Revell liam.revell@umb.edu
Felsenstein, J. (2012) A comparative method for both discrete and continuous characters using the threshold model. American Naturalist, 179, 145-156.
Revell, L. J. (2014) Ancestral character estimation under the threshold model from quantitative genetics. Evolution, 68, 743-759.
## Not run:
## load data from Revell & Collar (2009)
data(sunfish.tree)
data(sunfish.data)
## extract character of interest
fmode<-setNames(sunfish.data$feeding.mode,
rownames(sunfish.data))
## run MCMC
mcmc<-ancThresh(sunfish.tree,fmode,ngen=1000000)
## plot results
plot(mcmc,mar=c(0.1,0.1,4.1,0.1))
title(main="Posterior probabilities for node states",
font.main=3)
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.