triplot: Plot of prior, likelihood and posterior for a proportion

Description Usage Arguments Author(s) Examples

View source: R/triplot.R

Description

For a proportion problem with a beta prior, plots the prior, likelihood and posterior on one graph.

Usage

1
triplot(prior,data,where="topright")

Arguments

prior

vector of parameters for beta prior

data

vector consisting of number of successes and number of failures

where

the location of the legend for the plot

Author(s)

Jim Albert

Examples

1
2
3
prior=c(3,10)  # proportion has a beta(3, 10) prior
data=c(10,6)   # observe 10 successes and 6 failures
triplot(prior,data)

LearnBayes documentation built on May 20, 2017, 2:24 a.m.

Search within the LearnBayes package
Search all R packages, documentation and source code