Learn R Programming

bayesZIB (version 0.0.5)

bayesZIB-package: Bayesian zero-inflated Bernoulli regression model

Description

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

Arguments

Author

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>

Details

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.

See Also

bayesZIB

Examples

Run this code
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"))

Run the code above in your browser using DataLab