ml.nbc: NBC: maximum likelihood linear negative binomial regression

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

ml.nbc is a maximum likelihood function for estimating canonical linear negative binomial (NB-C) data.

Usage

1

Arguments

formula

an object of class '"formula"': a symbolic description of the model to be fitted. The details of model specification are given under 'Details'.

data

a mandatory data frame containing the variables in the model.

start

an optional vector of starting values for the parameters.

verbose

a logical flag to indicate whether the fit information should be printed.

Details

ml.nbc is used like glm.nb, but without saving ancillary statistics.

Value

The function returns a dataframe with the following components:

Estimate

ML estimate of the parameter

SE

Asymptotic estimate of the standard error of the estimate of the parameter

Z

The Z statistic of the asymptotic hypothesis test that the population value for the parameter is 0.

LCL

Lower 95% confidence interval for the parameter estimate.

UCL

Upper 95% confidence interval for the parameter estimate.

Author(s)

Andrew Robinson, Universty of Melbourne, Australia, and Joseph M. Hilbe, Arizona State University, and Jet Propulsion Laboratory, California Institute of Technology

References

Hilbe, J.M. (2011), Negative Binomial Regression, second edition, Cambridge University Press.

See Also

glm.nb, ml.nb1, ml.nb2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Table 10.12, Hilbe. J.M. (2011), Negative Binomial Regression, 
#   2nd ed. Cambridge University Press (adapted)

## Not run: 
data(medpar)
nobs <- 50000
x2 <- runif(nobs)
x1 <- runif(nobs)
xb <- 1.25*x1 + .1*x2 - 1.5
mu <- 1/(exp(-xb)-1)
p <- 1/(1+mu)
r <- 1
gcy <- rnbinom(nobs, size=r, prob = p)
test <- data.frame(gcy, x1, x2)
nbc <- ml.nbc(gcy ~ x1 + x2, data=test)
nbc

## End(Not run)

Example output

Loading required package: msme
Loading required package: MASS
Loading required package: lattice
Loading required package: sandwich
Warning messages:
1: In dnbinom(y, size = r.hat, prob = p.hat, log = TRUE) : NaNs produced
2: In dnbinom(y, size = r.hat, prob = p.hat, log = TRUE) : NaNs produced
3: In dnbinom(y, size = r.hat, prob = p.hat, log = TRUE) : NaNs produced
4: In dnbinom(y, size = r.hat, prob = p.hat, log = TRUE) : NaNs produced
              Estimate          SE         Z         LCL        UCL
(Intercept) -1.4943092 0.016887474 -88.48625 -1.52740868 -1.4612098
x1           1.2352094 0.014848128  83.18957  1.20610710  1.2643118
x2           0.1073196 0.008544749  12.55971  0.09057186  0.1240673
alpha        0.9960773 0.014898262  66.85862  0.96687668  1.0252779

COUNT documentation built on May 2, 2019, 2:37 a.m.

Related to ml.nbc in COUNT...