bayesbox: Compute Bayes Box

View source: R/NAME_bayesbox.R

bayesboxR Documentation

Compute Bayes Box

Description

Similar to Allen Downey's concept of a Bayes Box, such a table is computed by this function. It can be used for simple Bayes models of discrete (non-continuous) variables.

Usage

bayesbox(hyps, priors, liks, round = 2L)

Arguments

hyps

Vector of hypotheses (all types allowed), serves as ID

priors

Vector of prior probabilites (numeric)

liks

Vector of likelihoods (numeric)

round

number of decimal places, NULL for not rounding (integer)

Value

data.frame with Bayes Box

Examples


hyps <- seq(0,1, by = .1)
bayesbox(hyps = hyps, priors = 1, liks = dbinom(x = 5, size = 7, prob = hyps, round = 3))

sebastiansauer/prada documentation built on Jan. 17, 2024, 11:05 a.m.