These functions provide wrappers to BayesMultiState
in the BayesTraits package written by Mark Pagel and Andrew Meade.
multistateML(phy, traits, model = "ARD", anc.states = TRUE,
path = "/Applications/BayesTraits", dir = NULL)multistateMCMC(phy, traits, model = "ARD", anc.states = TRUE,
rd = 2, rjhp = NULL, fixNodes = NULL, it = 1e+05, bi = 10000,
sa = 1000, path = "/Applications/BayesTraits", dir = NULL)
an object of class phylo
.
a data.frame
with two columns. The first column contains the taxon labels, the second column contains the character states.
either logical
or a list
, the latter containing the tip labels of those internal nodes, for which the likelihood of ancestral character states should be estimated.
a real number, giving the RateDev
parameter, i.e., the deviation of the normal distribution, that changes to the rates are drawn from. Should be set such that acceptance of the rate parameters is about 0.2.
a character string giving the details of priors and hyperpriors for the reversible jump MCMC (rjMCMC). If left NULL
, a conventional MCMC is used. In order to use the rjMCMC, you must specify the distribution of the prior and the interval of the uniform hyperprior distribution that seeds it. For example, exp 0 30
specifies an exponential distribution seeded from a uniform distribution on the interval 0 to 30, and gamma 0 10 0 10
specifies a gamma prior with its mean and standard deviation seeded from uniform distributions on the interval 0 to 10.
a list giving fixed character states of certain internal nodes. This argument corresponds to the fossil
command in the MultiState manual.
numeric, sets the number of iterations to run the MCMC for.
numeric, sets the number of iterations of the MCMC that will be discarded as burn-in.
numeric, sets the the sample period in the MCMC.
a character string giving the path to executables in the BayesTraits package.
a character string giving a directory name where the input and output files will be stored. The directory will be created by multistateML
and must not exist already. If dir = NULL
(default) input and output is written to the working directory (thereby overwriting existing output).
The BayesTraits manual: http://www.evolution.rdg.ac.uk/Files/BayesTraits-V1.0-Manual.pdf.
Pagel, M., A. Meade, and D. Barker. 2004. Bayesian estiamation of ancestral character states on phylogenies. Syst. Biol. 53: 673-684.
Pagel, M. and A. Meade. 2006. Bayesian analysis of correlated evolution of discrete characters by reversible-jump Markov chain Monte Carlo. Am. Nat. 167: 808-825.