tess.plot.output: tess.plot.output: Plotting the output of a diversification...

Description Usage Arguments Details Author(s) Examples

View source: R/tess.plot.output.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
tess.plot.output(output,
                 fig.types=c("speciation rates", 
                             "speciation shift times",
                             "speciation Bayes factors", 
                             "extinction rates", 
                             "extinction shift times", 
                             "extinction Bayes factors", 
                             "fossilization rates", 
                             "fossilization shift times", 
                             "fossilization 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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)

hoehna/TESS documentation built on Feb. 3, 2022, 5:59 a.m.