ZINB2 {fbglm} | R Documentation |
Fit extended zero-inflated negative binomial regression model via maximum likelihood.
ZINB2(y, x)
y |
A response vector. |
x |
A data frame with covariates. |
The model regresses all the parameters– zero-inflation component \pi
(with logit link), and both the mean \mu
and dispersion parameter \theta
(with log link)– on covariates.
A list of log-likelihood, estimated coefficients, and maximum likelihood estimation results.
Breece, C. and Lee, J. (2024) Fractional binomial regression model for count data with excess zeros.https://arxiv.org/html/2410.08488v1
library(agridat)
library(bbmle)
sample<-sample(270, 30)
my_y<-ridout.appleshoots$roots[sample]
my_x<-data.frame(pho=ridout.appleshoots$pho[sample])
ZINB2(y=my_y, x=my_x )