Last data update: 2014.03.03

R: NB1: maximum likelihood linear negative binomial regression
ml.nb1R Documentation

NB1: maximum likelihood linear negative binomial regression

Description

ml.nb1 is a maximum likelihood function for estimating linear negative binomial (NB1) data. Output consists of a table of parameter estimates, standard errors, z-value, and confidence intervals.

Usage

ml.nb1(formula, data, offset=0, start=NULL, verbose=FALSE)

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.

offset

this can be used to specify an _a priori_ known component to be included in the linear predictor during fitting. The offset should be provided on the log scale.

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.nb1 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.nbc, ml.nb2

Examples

# Table 10.8, Hilbe. J.M. (2011), Negative Binomial Regression, 
#   2nd ed. Cambridge University Press (adapted)
data(medpar)
medpar$type <- factor(medpar$type)
med.nb1 <- ml.nb1(los ~ hmo + white + type, data = medpar)
med.nb1

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(COUNT)
Loading required package: msme
Loading required package: MASS
Loading required package: lattice
Loading required package: sandwich
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/COUNT/ml.nb1.Rd_%03d_medium.png", width=480, height=480)
> ### Name: ml.nb1
> ### Title: NB1: maximum likelihood linear negative binomial regression
> ### Aliases: ml.nb1
> ### Keywords: models
> 
> ### ** Examples
> 
> # Table 10.8, Hilbe. J.M. (2011), Negative Binomial Regression, 
> #   2nd ed. Cambridge University Press (adapted)
> data(medpar)
> medpar$type <- factor(medpar$type)
> med.nb1 <- ml.nb1(los ~ hmo + white + type, data = medpar)
> med.nb1
               Estimate         SE          Z         LCL         UCL
(Intercept)  2.34918407 0.06023641 38.9994023  2.23112070  2.46724744
hmo         -0.04533566 0.05004714 -0.9058592 -0.14342805  0.05275673
white       -0.12951295 0.06071130 -2.1332593 -0.24850710 -0.01051880
type2        0.16175471 0.04585569  3.5274735  0.07187757  0.25163186
type3        0.41879257 0.06553258  6.3906006  0.29034871  0.54723643
alpha        4.57898241 0.22015969 20.7984599  4.14746943  5.01049540
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>