bayesZIB-package | R Documentation |
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.5 |
Date: | 2023-09-09 |
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 <dmorina@ub.edu>
bayesZIB
set.seed(1234)
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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.