knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

bayesplay: The Bayesian playground

R-CMD-check Codecov test
coverage

The goal of bayesplay is to provide an interface for calculating Bayes factors for simple models. It does this in a way that makes the calculations more transparent and it is therefore useful as a teaching tools.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("ljcolling/bayesplay")

Basic usage

The bayesplay package comes with three basic functions for computing Bayes factors.

  1. The likelihood() function for specifying likelihoods

  2. The prior() function for specifying priors

  3. And the integral() function

Currently the following distributions are supported for likelihoods and priors

Priors

  1. Normal distribution (normal)

  2. Uniform distribution (uniform)

  3. t distribution, including scaled and shifted and non-central t distributions (student_t)

  4. Cauchy distributions (cauchy)

Likelihood

  1. Normal distribution (normal)

  2. t distribution, including scaled and shifted and non-central t distributions (student_t) (note, non-central t distribution not currently implemented)

Worked examples

For worked examples of the basic usage see basic usage.



BayesianPlayground/bayesplay documentation built on Jan. 8, 2021, 12:42 a.m.