Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

negbin.reg

Negative binomial regression


Description

Negative binomial regression.

Usage

negbin.reg(y, x, tol = 1e-07, maxiters = 100)

Arguments

y

The dependent variable, a numerical vector with integer valued numbers.

x

A matrix or a data.frame with the indendent variables.

tol

The tolerance value required by the Newton-Raphson to stop.

maxiters

The maximum iterations allowed.

Details

A negative binomial regression model is fitted. The standard errors of the regressions are not returned as we do not compute the full Hessian matrix at each step of the Newton-Raphson.

Value

A list including:

be

The regression coefficients.

loglik

The loglikelihood of the regression model.

iters

The iterations required by the Newton-Raphson.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Stefanos Fafalios stefanosfafalios@gmail.com.

See Also

Examples

y <- rnbinom(100, 10, 0.7)
x <- matrix( rnorm(100 * 3), ncol = 3 )
mod <- negbin.reg(y, x)

Rfast2

A Collection of Efficient and Extremely Fast R Functions II

v0.0.9
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Stefanos Fafalios and Marios Dimitriadis.
Initial release
2021-03-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.