Description Usage Arguments Value
Runs a Gibbs sampler for a two-state CMTC on a set of phylogenetic trees, with data at the tips of the trees.
1 2 3 | runTwoStateGibbs(inputTrees, rootDist, traitData, initLambda01, initLambda10,
priorAlpha01, priorBeta01, priorAlpha10, priorBeta10, mcmcSize, mcmcBurnin,
mcmcSubsample)
|
inputTrees |
|
rootDist |
Numeric vector of size two with probabilities of the two states at the root of the tree. |
traitData |
Vector of trait values, coded as 0 and 1. |
initLambda01 |
Initial value of the 0 -> 1 rate. |
initLambda10 |
Initial value of the 1 -> 0 rate. |
priorAlpha01 |
Shape parameter of the Gamma prior on the 0 -> 1 rate. |
priorBeta01 |
Rate parameter of the Gamma prior on the 0 -> 1 rate. |
priorAlpha10 |
Shape parameter of the Gamma prior on the 1 -> 0 rate. |
priorBeta10 |
Rate parameter of the Gamma prior on the 0 -> 1 rate. |
mcmcSize |
Total number of MCMC iterations. |
mcmcBurnin |
Number of initial iterations to ignore. |
mcmcSubsample |
Integer controlling how many MCMC iterations to save.
For example, |
List with two elements: the input trees and a matrix of MCMC output. The columns of MCMC output matrix are Iteration number, Index of a tree that was sampled at this iteration, Log posterior, 0 -> 1 rate, 1 -> 0 rate, Number of 0 -> 1 jumps, Number of 1 -> 0 jumps, Time spent in state 0, Time spent in state 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.