Learn R Programming

Bolstad (version 0.2-41)

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

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

decomp(x, ...)

Arguments

x

an object of class Bolstad.

any other arguments to be passed to the plot function.

Examples

Run this code
# NOT RUN {
# 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)

# }

Run the code above in your browser using DataLab