Learn R Programming

phytools (version 0.1-6)

fitBayes: Evolutionary model fitting with intraspecific variability using Bayesian MCMC

Description

This function uses Bayesian MCMC to sample terminal states (species means) as well as evolutionary parameters.

Usage

fitBayes(tree,x,ngen=10000,model="BM",method="reduced",control=list())

Arguments

tree
an object of class "phylo".
x
a vector of phenotypic values for individuals; names(x) should contain the species names (not individual IDs).
ngen
a integer indicating the number of generations for the MCMC.
model
an evolutionary model: either "BM" or "lambda".
method
a method: either "reduced" or "full".
control
a list of control parameters containing the following elements: sig2: starting value for sig^2 (BM rate); lambda: starting value for the lambda parameter; a: starting for the state at the root node; xbar

Value

  • a matrix with 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.

See Also

anc.Bayes, brownie.lite, evol.rate.mcmc