plot_binomial_cri: Plots the posterior distribution and a specified interval (if...

Description Usage Arguments Value Author(s) Examples

Description

Plots the posterior distribution and a specified interval (if defined) for the probability parameter underlying a binomially distributed outcome.

Usage

1
2
plot_binomial_cri(n_successes, n_trials, prob_lower = NULL,
  prob_upper = NULL, prior_shape1 = 1, prior_shape2 = 1)

Arguments

n_successes

The number of successes.

n_trials

The total number of trials.

prob_lower

The lower end point of the interval. Defaults to 0 if prob_upper is non-null.

prob_upper

The upper end point of the interval. Defaults to 1 if prob_lower is non-null.

prior_shape1

The shape1 parameter of the Beta distribution defining the prior. The default values shape1=1 and shape2=1 define a flat prior assigning equal probability density to all possible parameter values.

prior_shape2

The shape2 parameter of the Beta distribution defining the prior. The default values shape1=1 and shape2=1 define a flat prior assigning equal probability density to all possible parameter values.

Value

A ggplot2 object.

Author(s)

Titus von der Malsburg <malsburg@uni-potsdam.de>

Examples

1
plot_binomial_cri(6, 9, 0.5, 0.75)

tmalsburg/binomialCRIs documentation built on May 29, 2019, 5:41 a.m.