View source: R/tess.plot.multichain.diagnostics.R
tess.plot.multichain.diagnostics | R Documentation |
tess.plot.multichain.diagnostics plots MCMC diagnostics for the output generated by a tess.process.output(...) command. Fore more examples see the vignette.
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, ...)
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() |
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:
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.
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.
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.
Michael R. May
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.