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:
speciation rates: Plots the interval-specific speciation rates.
speciation shift times: Plots the posterior probability of at least one speciation-rate shift for each interval.
speciation Bayes factors: Plots the Bayes factor support for at least one speciation-rate shift for each interval (as 2 ln BF).
extinction rates: Plots the interval-specific extinction rates.
extinction shift times: Plots the posterior probability of at least one extinction-rate shift for each interval.
extinction Bayes factors: Plots the Bayes factor support for at least one extinction-rate shift for each interval (as 2 ln BF).
net-diversification ratesPlots the interval-specific net-diversification rates.
relative-extinction ratesPlots the interval-specific relative-extinction rates.
mass extinction times: Plots the posterior probability of at least one mass-extinction event for each interval.
mass extinction Bayes factors: Plots the Bayes factor support for at least one mass-extinction event for each interval (as 2 ln BF).
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)