Plot the prior and posterior distribution of shifts

Share:

Description

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

Usage

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

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.

Value

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

Author(s)

Pascal Title

Examples

1
2
data(mcmc.whales)
plotPrior(mcmc.whales, expectedNumberOfShifts = 1, burnin = 0.15)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.