Code Monkey home page Code Monkey logo

bayesplay's Introduction

bayesplay: The Bayesian playground

R-CMD-check CRAN downloads codecov

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

bayesplay is now on CRAN. You can install it with:

install.packages("bayesplay")

Or if you want to live on the edge, you can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("bayesplay/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. Scaled and shifted t distribution (student_t)

  4. Cauchy distributions (cauchy)

  5. Beta distribution (beta)

Likelihood

  1. Normal distribution (normal)

  2. Scaled and shifted t distribution (student_t)

  3. Binomial distribution (binomial)

  4. Various noncentral t distributions, including:

    • Noncentral t distribution (noncentral_t)

    • Noncentral t distribution scaled for a paired samples/one sample Cohen’s d (noncentral_d)

    • Noncentral t distribution scaled for an independent samples Cohen’s d (noncentral_d2)

Worked examples

For worked examples of the basic usage see basic usage. Or for basic plot functionality see basic plotting

Changelog

Breaking changes for < v0.9.0

distribution parameter for specifying likelihoods and priors has been renamed family

noncentral_d and noncentral_d2 are now parametrised in terms of sample size rather than df

bayesplay's People

Contributors

ljcolling avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.