knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("ljcolling/bayesplay")
The bayesplay
package comes with three basic functions for computing Bayes factors.
The likelihood()
function for specifying likelihoods
The prior()
function for specifying priors
And the integral()
function
Currently the following distributions are supported for likelihoods and priors
Normal distribution (normal
)
Uniform distribution (uniform
)
t distribution, including scaled and shifted and non-central t
distributions (student_t
)
Cauchy distributions (cauchy
)
Normal distribution (normal
)
t distribution, including scaled and shifted and non-central t
distributions (student_t
) (note, non-central t distribution not currently
implemented)
For worked examples of the basic usage see basic usage.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.