Learn R Programming

brr (version 1.0.0)

Brr: Creation and summary of a brr object

Description

Set up the Bayesian model and the observations

Usage

Brr(...)
"summary"(object, phi0 = 1, hypothesis = "greater", ...)
"print"(x, table.style = "grid", ...)

Arguments

...
prior parameters a, b, c, d, samples sizes S, T, observed counts x, y, future sample sizes Snew, Tnew, to be set as in a list (see examples)
object
an object of class brr
phi0
the value of interest of the rate ratio
hypothesis
"greater" to return $Pr(\phi>\phi_0)$, "lower" to return $Pr(\phi
x
the output to be printed
table.style
the style of the table to print (passed to pandoc.table.return)

Value

Brr returns an object of class brr, summary.brr returns a list but prints its contents through print.summary.brr

Examples

Run this code
model <- Brr(a=2, b=3)
model()
# add parameters
model <- model(c=4, d=5)
model()
# replace parameters
model <- model(a=10, b=11)
model()
model <- Brr()
summary(model)
model <- Brr(x=3, y=4)
summary(model)
model <- Brr(a=2, b=4, T=10)
summary(model)
model <- model(a=2, b=4, c=3, d=5, S=10, T=10)
summary(model)
model <- model(x=5, y=10)
summary(model)

Run the code above in your browser using DataLab