mergePosterior {ratematrix}R Documentation

Merge posterior distributions

Description

Join two or more independent MCMC chains from the same data and phylogenetic trees by appending them together into a single chain.

Usage

mergePosterior(...)

Arguments

...

any number of posterior distributions as produced by the function 'readMCMC'.

Value

A merged posterior distribution in the same format.

Author(s)

Daniel S. Caetano and Luke J. Harmon

Examples


data( centrarchidae )
## Run multiple MCMC chains.
handle.list <- lapply(1:4, function(x) ratematrixMCMC(data=centrarchidae$data
                      , phy=centrarchidae$phy.map, gen=10000, dir=tempdir()) )
## Read all to a list
posterior.list <- lapply(handle.list, readMCMC)
## Merge all posteriors in the list.
merged.four <- mergePosterior(posterior.list)
## Merge some of the posteriors.
merged.two <- mergePosterior(posterior.list[[1]], posterior.list[[3]])


[Package ratematrix version 1.2.4 Index]