# negative.binomial: Family function for Negative Binomial GLMs In MASS: Support Functions and Datasets for Venables and Ripley's MASS

## Description

Specifies the information required to fit a Negative Binomial generalized linear model, with known `theta` parameter, using `glm()`.

## Usage

 `1` ```negative.binomial(theta = stop("'theta' must be specified"), link = "log") ```

## Arguments

 `theta` The known value of the additional parameter, `theta`. `link` The link function, as a character string, name or one-element character vector specifying one of `log`, `sqrt` or `identity`, or an object of class `"link-glm"`.

## Value

An object of class `"family"`, a list of functions and expressions needed by `glm()` to fit a Negative Binomial generalized linear model.

## References

Venables, W. N. and Ripley, B. D. (1999) Modern Applied Statistics with S-PLUS. Third Edition. Springer.

`glm.nb`, `anova.negbin`, `summary.negbin`

## Examples

 ```1 2 3 4``` ```# Fitting a Negative Binomial model to the quine data # with theta = 2 assumed known. # glm(Days ~ .^4, family = negative.binomial(2), data = quine) ```

### Example output

```Call:  glm(formula = Days ~ .^4, family = negative.binomial(2), data = quine)

Coefficients:
(Intercept)                   EthN                   SexM
3.0564                -0.1386                -0.4914
AgeF1                  AgeF2                  AgeF3
-0.6227                -2.3632                -0.3784
LrnSL              EthN:SexM             EthN:AgeF1
-1.9577                -0.7524                 0.1029
EthN:AgeF2             EthN:AgeF3             EthN:LrnSL
-0.5546                 0.0633                 2.2588
SexM:AgeF1             SexM:AgeF2             SexM:AgeF3
0.4092                 3.1098                 1.1145
SexM:LrnSL            AgeF1:LrnSL            AgeF2:LrnSL
1.5900                 2.6421                 4.8585
AgeF3:LrnSL        EthN:SexM:AgeF1        EthN:SexM:AgeF2
NA                -0.3105                 0.3469
EthN:SexM:AgeF3        EthN:SexM:LrnSL       EthN:AgeF1:LrnSL
0.8329                -0.1639                -3.5493
EthN:AgeF2:LrnSL       EthN:AgeF3:LrnSL       SexM:AgeF1:LrnSL
-3.3315                     NA                -2.4285
SexM:AgeF2:LrnSL       SexM:AgeF3:LrnSL  EthN:SexM:AgeF1:LrnSL
-4.1914                     NA                 2.1711
EthN:SexM:AgeF2:LrnSL  EthN:SexM:AgeF3:LrnSL
2.1029                     NA

Degrees of Freedom: 145 Total (i.e. Null);  118 Residual
Null Deviance:	    280.2
Residual Deviance: 172 	AIC: 1095
```

MASS documentation built on May 3, 2021, 5:08 p.m.