tess.plot.multichain.diagnostics {TESS}R Documentation

tess.plot.multichain.diagnostics: Plotting the mcmc diagnostics of a episodic diversification rate analysis with mass-extinction events.

Description

tess.plot.multichain.diagnostics plots MCMC diagnostics for the output generated by a tess.process.output(...) command. Fore more examples see the vignette.

Usage

tess.plot.multichain.diagnostics(outputs,
                                      parameters=c("speciation rates",
                                                   "speciation shift times",
                                                   "extinction rates",
                                                   "extinction shift times",
                                                   "net-diversification rates",
                                                   "relative-extinction rates",
                                                   "mass extinction times"),
                                      diagnostics="Gelman-Rubin",
                                      gelman.crit=1.05,
                                      xlab="million years ago",
                                      col=NULL,
                                      xaxt="n",
                                      yaxt="s",
                                      pch=19,
                                      ...)

Arguments

outputs

The processed output for plotting.

parameters

Which parameters to diagnose. See details for a complete description.

diagnostics

Which diagnostics to use. Currently the only option is "Rubin-Gelman".

gelman.crit

The critical value above which a Rubin-Gelman statistic is considered a failure.

xlab

The label of the x-axis. By default, millions of years.

col

Colors used for printing. Must be of same length as fig.types.

xaxt

The type of x-axis to plot. By default, no x-axis is plotted (recommended).

yaxt

The type of y-axis to plot.

pch

The type of points to draw (if points are drawn).

...

Arguments delegated to plot()

Details

This function generates visual summaries of multi-chain MCMC diagnostics for the CoMET analysis in the output object. The argument parameters specifies the aspects of the model to summarize. Valid options are:

Author(s)

Michael R. May

Examples

# Load the data, compute the sampling fraction rho
data(conifers)
totalConiferSpecies <- 630
sampledConiferSpecies <- conifers$Nnode+1
rho <- sampledConiferSpecies / totalConiferSpecies

# Run a tess analysis
tess.analysis(tree = conifers,
              initialSpeciationRate=c(1.0),
              initialExtinctionRate=c(0.5),
              empiricalHyperPriors = FALSE,
              numExpectedRateChanges = 2,
              numExpectedMassExtinctions = 2,
              samplingProbability = rho,
              MAX_ITERATIONS = 200,
              BURNIN = 100,
              dir = "./run_1")

tess.analysis(tree = conifers,
              initialSpeciationRate=c(1.0),
              initialExtinctionRate=c(0.5),
              empiricalHyperPriors = FALSE,
              numExpectedRateChanges = 2,
              numExpectedMassExtinctions = 2,
              samplingProbability = rho,
              MAX_ITERATIONS = 200,
              BURNIN = 100,
              dir = "./run_2")

# Process the output
coniferOutput_1 <- tess.process.output(dir="./run_1",
                                     numExpectedRateChanges=2,
                                     numExpectedMassExtinctions=2)

coniferOutput_2 <- tess.process.output(dir="./run_2",
                                     numExpectedRateChanges=2,
                                     numExpectedMassExtinctions=2)

# Plot the output
outputs <- list(coniferOutput_1,coniferOutput_2)
tess.plot.multichain.diagnostics(outputs)


[Package TESS version 2.1.2 Index]