Learn R Programming

phytools (version 0.2-40)

ancThresh: Ancestral character estimation under the threshold model using Bayesian MCMC

Description

This function uses Bayesian MCMC to estimate ancestral states and thresholds for a discrete character under the threshold model from quantitative genetics (Felsenstein 2012).

Usage

ancThresh(tree, x, ngen=1000, sequence=NULL, method="mcmc", control=list(), ...)

Arguments

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 x is a vector then numerical/alphabetical order is assumed; if not supplied and x is a matrix, then the column order of x is used.
method
only method currently available is "mcmc".
control
list containing the following elements: sample, the sampling interval; propliabvariance of the proposal distribution for liabilities; propthresh variance on the proposal distribution for the thresholds; pr.anc<
...
additional arguments to be passed to plotThresh (called internally).

Value

  • This function returns as list with four elements:
  • aceposterior probabilities for each character state at each internal node, with the burn-in excluded.
  • mcmcfull posterior sample for the states.
  • parfull posterior sample for the thresholds and likelihood.
  • liabfull posterior sample of the liabilities at internal and tip nodes.

References

Felsenstein, J. (2012) A comparative method for both discrete and continuous characters using the threshold model. American Naturalist, 179, 145-156.

See Also

anc.Bayes, threshBayes