bayesZIB-package {bayesZIB}R Documentation

Bayesian zero-inflated Bernoulli regression model


This package fits a Bayesian Bernoulli zero-inflated regression model handling different covariates for the zero-inflated and non zero-inflated parts.


Package: bayesZIB
Type: Package
Version: 0.0.2
Date: 2021-5-12
License: GPL version 2 or newer
LazyLoad: yes

The package implements a new Bayesian Bernoulli zero-inflated. This model is able to distinguish between two sources of zeroes (structural and non-structural) on the basis of a Bayesian framework, using rstan. All the convergence and goodness-of-fit tests from rstan are available.


David Moriña (Universitat de Barcelona), Pedro Puig (Universitat Autònoma de Barcelona) and Albert Navarro (Universitat Autònoma de Barcelona)

Mantainer: David Moriña Soler <>

See Also



x <- rbinom(20, 1, 0.4)   # Structural zeroes 
y <- rbinom(20, 1, 0.7*x) # Non-structural zeroes
fit <- bayesZIB(y~1|1, priors=list(c(0,0.5), c(0.5,1)))
print(fit$fit, pars=c("theta", "beta"))

[Package bayesZIB version 0.0.2 Index]