Learn R Programming

BAMMtools (version 2.1.0)

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', ...)

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.

Examples

Run this code
data(mcmc.whales)

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

Run the code above in your browser using DataLab