Threshold model using Bayesian MCMC
This function uses Bayesian MCMC to fit the quantitative genetics threshold model (Felsenstein 2012) to data for two discrete characters or one discrete and one continuous character.
threshBayes(tree, X, types=NULL, ngen=10000, control=list(), ...)
tree |
an object of class |
X |
a matrix or data frame containing values for a discrete character and a continuous character; or two discrete characters. The row names of |
types |
a vector of length |
ngen |
a integer indicating the number of generations for the MCMC. |
control |
a list of control parameters for the MCMC. Control parameters include: |
... |
other optional arguments. The argument |
The plot
method for the object class can be used to generate a three panel plot showing the likelihood profile, the mean acceptance rates (using a sliding window), and a profile plot for the correlation coefficient, r.
The density
method for the object can be used to plot a posterior density of the correlation coefficient, r. This posterior density is of class "density.threshBayes"
which can also be plotted using an plot
method.
Discrete characters must be binary, but can be coded as any factor.
This function returns an object of class "threshBayes"
consisting of a list with at least the following two elements: par
a matrix containing the posterior sample for the model parameters (evolutionary rates, ancestral states, and correlation); liab
a matrix containing the posterior sample of the liabilities. For continuous characters, the liabilities are treated as known and so the posterior samples are just the observed values.
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. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.
Revell, L. J. (2014) Ancestral character estimation under the threshold model from quantitative genetics. Evolution, 68, 743-759.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.