Negative Binomial and Beta-Binomial Regression Models
Produces an object of the class overglm in which are stored the main results of the negative binomial or beta-binomial regression model fitted to the data.
overglm(formula, family, weights, data, subset, start, ...)
formula |
a |
family |
a character string which describe the distribution of the response variable and the link function. The following distributions are supported: negative binomial I ("nb1"), negative binomial II ("nb2"), negative binomial III ("nb3"), and beta-binomial ("bb"). Link functions available for negative binomial and beta-binomial regression models are the same than those available for Poisson and binomial regression models, respectively. See family documentation. |
weights |
an (optional) vector of positive "prior weights" to be used in the fitting process. The length of |
data |
an (optional) |
subset |
an (optional) vector specifying a subset of observations to be used in the fitting process. |
start |
an (optional) vector of starting values for the parameters in the linear predictor. |
... |
further arguments passed to or from other methods. |
The negative binomial distributions can be obtained as mixture of the Poisson and Gamma distributions. Let Y | λ ~ Poisson(λ), where E(Y | λ)=λ and Var(Y | λ)=λ, and λ ~ Gamma(β,α), where E(λ)=β and Var(λ)=αβ^2. Therefore,
(1) If β=μ and α=φ then Y ~ Binomial Negativa I(μ,φ), E(Y)=μ and Var(Y)=μ + φμ^2.
(2) If β=μ and α=φ/μ then Y ~ Binomial Negativa II(μ,φ), E(Y)=μ and Var(Y)=(φ + 1)μ.
(3) If β=μ and α=φμ then Y ~ Binomial Negativa III(μ,φ), E(Y)=μ and Var(Y)=μ+φμ^3.
So, the regression models based on the negative binomial distributions are alternatives to the Poisson regression model under the presence of overdispersion.
The beta-binomial distribution can be obtained as mixture of the binomial and Beta distributions. Let mY | π ~ Binomial(m,π), where E(Y | π)=π and Var(Y | π)=(1/m)π(1-π), and π ~ Beta(μ,φ), where E(π)=μ and Var(π)=[φ/(φ+1)]μ(1-μ), then mY ~ Beta Binomial(m,μ,φ), E(Y)=μ and Var(Y)=(1/m)μ(1-μ)[1 + (m-1)φ/(φ+1)].
So, the regression model based on the beta-binomial distribution is an alternative to the binomial regression model under the presence of overdispersion.
an object of the class overglm in which are stored the main results of the model fitted to the data. Some of those results can be easily accessed using functions as, for example, print()
, summary()
, model.matrix()
, estequa()
, coef()
, vcov()
, logLik()
, fitted()
, confint()
and predict()
. In addition, the model fitted to the data
can be assessed using functions as, for instance, anova.overglm, residuals.overglm, dfbeta.overglm, cooks.distance.overglm and envelope.overglm. The variable selection may be accomplished using stepCriterion.overglm.
Lawless J.F. (1987) Negative binomial and mixed poisson regression, The Canadian Journal of Statistics 15, 209-225.
Crowder M. (1978) Beta-binomial anova for proportions, Journal of the Royal Statistical Society Series C (Applied Statistics) 27, 34-37.
fit1 <- overglm(tumors ~ group, family="nb3(log)", data=mammary) summary(fit1) fit2 <- overglm(infections ~ frequency + location, family="nb1(log)", data=swimmers) summary(fit2) fit3 <- overglm(cbind(cells,200-cells) ~ tnf + ifn + tnf*ifn, family="bb(logit)", data=cellular) summary(fit3) fit4 <- overglm(cbind(fetuses,litter-fetuses) ~ pht*tcpo, family="bb(logit)", data=ossification) summary(fit4)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.