decomp: Plot the prior, likelihood, and posterior on the same plot.

Description Usage Arguments Note Author(s) Examples

View source: R/decomp.R

Description

This function takes any object of class Bolstad and plots the prior, likelihood and posterior on the same plot. The aim is to show the influence of the prior, and the likelihood on the posterior.

Usage

1
decomp(x, ...)

Arguments

x

an object of class Bolstad.

...

any other arguments to be passed to the plot function.

Note

Note that xlab, ylab, main, axes, xlim, ylim and type are all used in the function so specifying them is unlikely to have any effect.

Author(s)

James Curran

Examples

1
2
3
4
5
6
7
8
# an example with a binomial sampling situation
results = binobp(4, 12, 3, 3, plot = FALSE)
decomp(results)

# an example with normal data
y = c(2.99,5.56,2.83,3.47)
results = normnp(y, 3, 2, 1, plot = FALSE)
decomp(results)

Bolstad documentation built on Jan. 8, 2021, 2:03 a.m.