binomial_posterior_plot: Plot the posterior distribution of a binomial model with Beta...

binomial_posterior_plotR Documentation

Plot the posterior distribution of a binomial model with Beta prior

Description

Plot the posterior distribution of a binomial model with Beta prior

Usage

binomial_posterior_plot(
  n,
  m,
  alpha = 1,
  beta = 1,
  show_hpd = TRUE,
  level = 0.95,
  xlim = c(0, 1)
)

Arguments

n

Number of trials

m

Number of successes

alpha

First shape parameters of the Beta prior

beta

Second shape parameter of the Beta prior

show_hpd

Show the HPD interval

level

The amount of mass in HPD interval

xlim

The limits on x-axis

Examples

binomial_posterior_plot(250, 139, 5, 5)
binomial_posterior_plot(100, 60, 2, 2, level = 0.99)

mark-andrews/isdsr-pkg documentation built on Sept. 13, 2022, 11:47 p.m.