bayesplay

The Bayesian playground. A package for learning Bayes factors

https://github.com/bayesplay/bayesplay

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.7%) to scientific vocabulary

Keywords

bayes bayesian bayesian-statistics r
Last synced: 6 months ago · JSON representation ·

Repository

The Bayesian playground. A package for learning Bayes factors

Basic Info
Statistics
  • Stars: 6
  • Watchers: 1
  • Forks: 2
  • Open Issues: 1
  • Releases: 3
Topics
bayes bayesian bayesian-statistics r
Created almost 5 years ago · Last pushed 10 months ago
Metadata Files
Readme License Citation

README.Rmd

---
output: github_document
---



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

# bayesplay: The Bayesian playground


 
![R-CMD-check](https://github.com/bayesplay/bayesplay/workflows/R-CMD-check/badge.svg)
![CRAN](https://www.r-pkg.org/badges/version-ago/bayesplay)
![downloads](https://cranlogs.r-pkg.org/badges/grand-total/bayesplay)
[![codecov](https://codecov.io/gh/bayesplay/bayesplay/branch/main/graph/badge.svg)](https://app.codecov.io/gh/bayesplay/bayesplay)



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:

```r
install.packages("bayesplay")
```

Or if you want to live on the edge, you can install the development version 
from [GitHub](https://github.com/) with:

``` r
# 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](https://bayesplay.github.io/bayesplay/articles/basic.html). Or for basic plot functionality see [basic plotting](https://bayesplay.github.io/bayesplay/articles/plots.html)

## 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

Owner

  • Name: Bayesplay
  • Login: bayesplay
  • Kind: organization
  • Email: bayesplay@colling.net.nz
  • Location: United Kingdom

Citation (CITATION.cff)

# YAML 1.2
---
abstract: "A lightweight modelling syntax for defining likelihoods and priors and for computing Bayes factors for simple one parameter models. It includes functionality for computing and plotting priors, likelihoods, and model predictions. Additional functionality is included for computing and plotting posteriors."
authors: 
  -
    family-names: Colling
    given-names: "Lincoln J"
    orcid: "https://orcid.org/0000-0002-3572-7758"
cff-version: "1.1.0"
date-released: 2021-07-15
license: MIT
message: "If you use this software, please cite it using these metadata."
title: "bayesplay: The Bayes Factor Playground "
version: "v0.9.2"
...

GitHub Events

Total
  • Issues event: 1
  • Delete event: 1
  • Push event: 15
  • Pull request review event: 2
  • Pull request event: 2
  • Create event: 2
Last Year
  • Issues event: 1
  • Delete event: 1
  • Push event: 15
  • Pull request review event: 2
  • Pull request event: 2
  • Create event: 2

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 71
  • Total Committers: 2
  • Avg Commits per committer: 35.5
  • Development Distribution Score (DDS): 0.014
Past Year
  • Commits: 19
  • Committers: 1
  • Avg Commits per committer: 19.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Lincoln Colling l****n@c****z 70
Lincoln Colling l****3@L****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 11
  • Total pull requests: 37
  • Average time to close issues: 8 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 1.64
  • Average comments per pull request: 0.0
  • Merged pull requests: 35
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 2 months
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ljcolling (7)
  • FBartos (5)
Pull Request Authors
  • ljcolling (38)
Top Labels
Issue Labels
enhancement (3) documentation (3) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 347 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: bayesplay

The Bayes Factor Playground

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 347 Last month
Rankings
Downloads: 20.1%
Stargazers count: 20.6%
Forks count: 21.0%
Average: 22.8%
Dependent repos count: 23.9%
Dependent packages count: 28.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • gginnards * imports
  • methods * imports
  • covr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • markdown * suggests
  • rmarkdown * suggests
  • testthat * suggests
  • vdiffr * suggests
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/lint.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/pkgdown.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/test-coverage.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite