nbglm {ptmixed}R Documentation

Negative binomial generalized linear model

Description

Estimates a negative binomial generalized linear model.

Usage

nbglm(formula, offset = NULL, data, maxit = c(500, 1e+05), trace = T,
  theta.start = NULL)

Arguments

formula

A formula for the fixed effects part of the model. It should be in the form y ~ x1 + x2

offset

An offset to be added to the linear predictor. Default is NULL.

data

A data frame containing the variables declared in formula.

maxit

Vector containing the maximum number of iterations used in optim by the BFGS method and, if this fails, by the Nelder-Mead method

trace

Logical value. If TRUE, additional information is printed during the optimization. Default is TRUE.

theta.start

Numeric vector comprising initial parameter values for the vector of regression coefficients and the dispersion parameter

Details

Maximum likelihood estimation of a negative binomial GLM (the NB distribution is obtained as special case of the Poisson-Tweedie distribution when a = 0).

Value

A list containing the following elements: function's call (call); maximum likelihood estimate (mle); value of the loglikelihood at the mle (logl); convergence value (if 0, the optimization converged); the observed Fisher information (fisher.info) and the starting values used in the optimization (theta.init)

Author(s)

Mirko Signorelli

References

Signorelli, M., Spitali, P., Tsonaka, R. (2021). Poisson-Tweedie mixed-effects model: a flexible approach for the analysis of longitudinal RNA-seq data. Statistical Modelling, 21 (6), 520-545. URL: https://doi.org/10.1177/1471082X20936017

See Also

ptmixed for the Poisson-Tweedie GLMM

Examples

data(df1, package = 'ptmixed')

# estimate the model
fit1 = nbglm(formula = y ~ group*time, data = df1)

# view model summary
summary(fit1)

[Package ptmixed version 1.1.3 Index]