tess.plot.output {TESS}R Documentation

tess.plot.output: Plotting the output of a diversification rate estimation including mass-extinction events.

Description

tess.output.summary plots the output generated by a tess.process.output(...) command. More specifically, you can plot the speciation, extinction, diversification and relative extinction rate over time, as well as the probability and Bayes factor for the timing of rate shifts and mass-extinction events. For more examples see the vignette.

Usage

tess.plot.output(output,
                 fig.types=c("speciation rates",
                             "speciation shift times",
                             "speciation Bayes factors",
                             "extinction rates",
                             "extinction shift times",
                             "extinction Bayes factors",
                             "net-diversification rates",
                             "relative-extinction rates",
                             "mass extinction times",
                             "mass extinction Bayes factors"),
                 xlab="million years ago",
                 col=NULL,
                 col.alpha=50,
                 xaxt="n",
                 yaxt="s",
                 pch=19,
                 plot.tree=FALSE,
                            ...)

Arguments

output

The processed output for plotting.

fig.types

Which aspects of the model to visualize. See details for a complete description.

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.

col.alpha

Alpha channel parameter for credible intervals.

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

plot.tree

Are we plotting the tree too?

...

Arguments delegated to plot()

Details

This function generates visual summaries of the CoMET analysis in the output object. The argument fig.types 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.output(coniferOutput)

[Package TESS version 2.1.2 Index]