Learn R Programming

rwty (version 1.0.3)

makeplot.pseudo.ess: Plot the pseudo ESS of tree topologies from MCMC chains.

Description

This function takes a list of rwty.chain objects, and plots the pseudo ESS of the tree topologies from each chain, after removing burnin. Each caulcation is repeated n times, where in each replicate a random tree from the chain is chosen as a 'focal' tree. The calculation works by calculating the path distance of each tree in the chain from the focal tree, and calculating the ESS of the resulting vector of phylogenetic distances using the effectiveSize function from the coda package. NB this function requires the calculation of many tree distances, so can take some time.

Usage

makeplot.pseudo.ess(chains, burnin = 0, n = 20)

Value

pseudo.ess.plot A ggplot2 plot object, in which each chain is represented by a point which represents the median pseudo ESS from the n replicates, and whiskers representing the upper and lower 95

Arguments

chains

A list of rwty.chain objects.

burnin

The number of trees to eliminate as burnin

n

The number of replicate analyses to do

Examples

Run this code
if (FALSE) {
data(fungus)
makeplot.pseudo.ess(fungus, burnin = 20, n = 10)
}

Run the code above in your browser using DataLab