Learn R Programming

BAMMtools (version 2.1.12)

plotPrior: Plot the prior and posterior distribution of shifts

Description

Generates a barplot of the prior and posterior distributions of the number of shifts.

Usage

plotPrior(
  mcmc,
  expectedNumberOfShifts = 1,
  burnin = 0.15,
  priorCol = "light blue",
  postCol = "red",
  legendPos = "topright",
  ...
)

Value

Invisibly returns a matrix with the probability of each shift number under the prior and the posterior.

Arguments

mcmc

A dataframe of the mcmc_out file from a BAMM run, or the filename.

expectedNumberOfShifts

Expected number of shifts under the prior.

burnin

The fraction of samples to discard as burn-in.

priorCol

Color for the prior distribution.

postCol

Color for the posterior distribution.

legendPos

Placement of the legend, see legend.

...

Additional parameters that are passed to barplot.

Author

Pascal Title

Examples

Run this code
data(mcmc.whales)
plotPrior(mcmc.whales, expectedNumberOfShifts = 1, burnin = 0.15)

Run the code above in your browser using DataLab