
Last chance! 50% off unlimited learning
Sale ends in
Reads the output files from the MCMC with the posterior distribution of the chains.
readMCMC(handle, burn = 0, thin = 1, dir = NULL)
the output object from the 'ratematrixMCMC' function.
the proportion of the burnin to be pruned from the MCMC chain. A number between 0 and 1 (default is 0).
the thinning of the posterior distribution. A number with the interval between each MCMC step to be kept in the posterior distribution (default is 1).
directory with the output files. If 'NULL' (default), then files are read from the directory chosen when running the MCMC chain using the argument 'dir' of the 'ratematrixMCMC' function (stored on handle). Otherwise function will read files from 'dir'.
List with the MCMC chain for the phylogenetic mean (root value) and evolutionary rate matrices (R). *root* are the values for the phylogenetic mean in matrix format; *matrix* is a list of length equal to the number of rate regimes fitted to the tree, each of those are lists with the chain of respective R matrices.
# NOT RUN {
## Load data
data(centrarchidae)
## Run MCMC. This is just a very short chain.
handle <- ratematrixMCMC(data=centrarchidae$data, phy=centrarchidae$phy.map, gen=10000
, dir=tempdir())
## Load posterior distribution.
## We can set the burn-in value and the thinning.
posterior <- readMCMC(handle, burn=0.25, thin=1)
# }
Run the code above in your browser using DataLab