zero_nb
is used to fit zero-inflated
negative binomial regression models to count data via Bayesian inference.
zero_nb(y, x, size, a = 1, b = 1, mu.start = 1, beta.prior.mean = 0,
beta.prior.sd = 1, iters = 1000, burn = 500, nthin = 1, plots = T,
progress.bar = T)
numeric response vector.
numeric predictor matrix.
size parameter for negative binomial likelihood distributions.
shape parameter for gamma prior distributions.
rate parameter for gamma prior distributions.
initial value for mu parameter.
mu parameter for normal prior distributions.
standard deviation for normal prior distributions.
number of iterations for the Markov chain to run.
numeric burn-in length.
numeric thinning rate.
logical operator. TRUE
to output plots.
logical operator. TRUE
to print progress bar.
zero_nb
returns a list which includes the items
numeric vector; posterior distribution of mu parameter
numeric matrix; posterior distributions of regression coefficients
numeric vector; posterior distribution of parameter 'p', the probability of a given zero observation belonging to the model's zero component
numeric vector; posterior log-likelihood
Fits a zero-inflated negative binomial (ZINB) model.