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

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

Description

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

Usage

tess.plot.singlechain.diagnostics(output,
                                      parameters=c("speciation rates",
                                                   "speciation shift times",
                                                   "extinction rates",
                                                   "extinction shift times",
                                                   "net-diversification rates",
                                                   "relative-extinction rates",
                                                   "mass extinction times"),
                                      diagnostics=c("ESS","geweke"),
                                      ess.crit=c(100,200),
                                      geweke.crit=0.05,
                                      correction="bonferroni",
                                      xlab="million years ago",
                                      col=NULL,
                                      xaxt="n",
                                      yaxt="s",
                                      pch=19,
                                      ...)

Arguments

output

The processed output for plotting.

parameters

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

diagnostics

Which diagnostics to use. Options are "ESS" and "geweke".

ess.crit

Two values which correspond to low ESS threshold and acceptable ESS threshold. Default values are 100 and 200.

geweke.crit

The p-value cutoff for Geweke's diagnostic. Default is the canonical 0.05.

correction

What type of multiple-correction method to use. Options are "bonferroni" and "sidak".

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 single-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)

# Process the output
coniferOutput <- tess.process.output(dir=getwd(),
                                     numExpectedRateChanges=2,
                                     numExpectedMassExtinctions=2)

# Plot the output
tess.plot.singlechain.diagnostics(coniferOutput)

[Package TESS version 2.1.2 Index]