fitBayes
uses Bayesian MCMC to sample terminal states (species means) as well as the parameters of an evolutionary model from their joint posterior distribution, following Revell & Reynolds (2012).
fitBayes(tree, x, ngen=10000, model="BM", method="reduced", control=list())
An object of class "fitBayes"
that includes a matrix (mcmc
) with a number of rows ngen/control$sample+1
containing the posterior sample and likelihoods.
Matrix columns are labeled by species (for species means and variances), or by the corresponding evolutionary parameter.
an object of class "phylo"
.
a vector of phenotypic values for individuals; names(x)
should contain the species names (not individual IDs).
a integer indicating the number of generations for the MCMC.
an evolutionary model: either "BM"
or "lambda"
.
a method: either "reduced"
or "full"
.
a list of control parameters containing the following elements: sig2
: starting value for \(\sigma^2\) (BM rate); lambda
: starting value for the \(\lambda\) parameter; a
: starting for the state at the root node; xbar
: starting values for the states at the tips; intV
: starting value for the intraspecific variance (reduced method); or v
: starting value for the vector of intraspecific variances for all species (full method); pr.mean
: means for the prior distributions in the following order - sig2
, lambda
(if applicable), a
, xbar
, intV
or v
(if applicable), note that the prior probability distribution is exponential for sig2
and normal for a
and y
; pr.var
: variances on the prior distributions, same order as pr.mean
.
Liam Revell liam.revell@umb.edu
Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
Revell, L. J. and R. G. Reynolds. (2012) A new Bayesian method for fitting evolutionary models to comparative data with intraspecific variation. Evolution, 66, 2697-2707.
anc.Bayes
, brownie.lite
, evol.rate.mcmc