glm_nb: Fit a Negative Binomial Generalized Linear Model

View source: R/glm_nb.R

glm_nbR Documentation

Fit a Negative Binomial Generalized Linear Model

Description

A modification of glm.nb to provide a more efficient workhorse function analagous to glm.fit where the response vector, design matrix, and family have already been calculated.

Usage

glm_nb(
  x,
  y,
  weights = rep(1, nobs),
  start = NULL,
  etastart = NULL,
  mustart = NULL,
  offset = rep(0, nobs),
  family = poisson(),
  control = list(),
  intercept = TRUE
)

Arguments

x

A design matrix of dimension n * p

y

A vector of observations of length n.

weights

(Optional) numeric vector of prior weights placed on the observations during model fitting. Default is NULL.

start

(Optional) starting values for the parameters in the linear predictor.

etastart

(Optional) starting values for the linear predictor.

mustart

(Optional) starting values for the vector of means.

offset

A vector of length nobs specifying an a priori known component that will be added to the linear predictor before applying the link function. Default is NULL.

family

The result of a call to either poisson or negative.binomial.

control

A list of parameters for controlling the fitting process to be passed to glm.control


jashu/beset documentation built on April 20, 2023, 5:28 a.m.