topological.pseudo.ess {rwty} | R Documentation |
Calculate the pseudo Effective Sample Size (ESS) of tree topologies
Description
This function takes a list of rwty.chain objects, and calculates the pseudo ESS of the trees 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 many tree distances, so can take some time.
Usage
topological.pseudo.ess(chains, burnin = 0, n = 20, treedist = "PD")
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 |
treedist |
the type of tree distance metric to use, can be 'PD' for path distance or 'RF' for Robinson Foulds distance |
Value
A data frame with one row per chain, and columns describing the median ESS, the upper and lower 95 replicates performed, and the name of the chain.
Examples
## Not run:
data(fungus)
topological.pseudo.ess(fungus, burnin = 20, n = 20)
## End(Not run)