Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bayesian Analysis, No Gibbs

License

NotificationsYou must be signed in to change notification settings

paulnorthrop/bang

Repository files navigation

AppVeyor Build StatusR-CMD-checkCoverage StatusCRAN_Status_BadgeDownloads (monthly)Downloads (total)

Bayesian Analysis, No Gibbs

What does bang do?

Provides functions for the Bayesian analysis of some simplecommonly-used models, without using Markov Chain Monte Carlo (MCMC)methods such as Gibbs sampling. The ‘rust’ packagehttps://cran.r-project.org/package=rust is used to simulate a randomsample from the required posterior distribution, using theratio-of-uniforms method. Currently three conjugate hierarchical modelsare available: beta-binomial, gamma-Poisson and a 1-way Analysis ofVariance (ANOVA). Advantages of the ratio-of-uniforms method over MCMCin this context are that the user is not required to set tuningparameters nor to monitor convergence and a random posterior sample isproduced.

A simple example

Thehef function samples from the posterior distribution of theparameters of certain hierarchical exponential family models. Thefollowing code performs essentially the same analysis of the rat tumordata using a beta-binomial hierarchical model that appears in Section5.3 of Gelman, A., Carlin, J. B., Stern, H. S. Dunson, D. B., Vehtari,A. and Rubin, D. B. (2014) Bayesian Data Analysis. Chapman & Hall / CRC.http://www.stat.columbia.edu/~gelman/book/.

library(bang)rat_res<- hef(model="beta_binom",data=rat)plot(rat_res)

Installation

To get the current released version from CRAN:

install.packages("bang")

[8]ページ先頭

©2009-2025 Movatter.jp