Learn R Programming

MNB (version 1.2.0)

fit.MNB: Maximum likelihood estimation

Description

Estimate parameters by quasi-Newton algorithms.

Usage

fit.MNB(star, formula, dataSet, tab = TRUE)

Value

Returns a list of summary statistics of the fitted multivariate negative binomial model.

Arguments

star

Initial values for the parameters to be optimized over.

formula

The structure matrix of covariates of dimension n x p (in models that include an intercept x should contain a column of ones).

dataSet

data

tab

Logical. Print a summary of the coefficients, standard errors and p-value for class "MNB".

Author

Jalmar M F Carrasco <carrascojalmar@gmail.com>, Cristian M Villegas Lobos <master.villegas@gmail.com> and Lizandra C Fabio <lizandrafabio@gmail.com>

Details

Method "BFGS" is a quasi-Newton method, specifically that published simultaneously in 1970 by Broyden, Fletcher, Goldfarb and Shanno. This uses function values and gradients to build up a picture of the surface to be optimized.

References

  • Fabio, L., Paula, G. A., and de Castro, M. (2012). A Poisson mixed model with nonormal random effect distribution. Computational Statistics and Data Analysis, 56, 1499-1510.

  • Fabio, L. C., Villegas, C., Carrasco, J. M. F., and de Castro, M. (2023). Diagnostic tools for a multivariate negative binomial model for fitting correlated data with overdispersion. Communications in Statistics - Theory and Methods, 52, 1833–1853.

  • Fabio, L. C., Villegas, C., Mamun, A. S., and Carrasco, J. M. F. (2025). Residual analysis for discrete correlated data in the multivariate approach. Brazilian Journal of Biometrics, 43, e43728.

Examples

Run this code

# \donttest{

data(seizures)
head(seizures)

star <-list(phi=1, beta0=1, beta1=1, beta2=1, beta3=1)

mod1 <- fit.MNB(formula=Y ~ trt + period +
trt:period + offset(log(weeks)), star=star, dataSet=seizures)

mod1

seizures49 <- seizures[-c(241,242,243,244,245),]

mod2 <- fit.MNB(formula=Y ~ trt + period +
trt:period + offset(log(weeks)), star=star, dataSet=seizures49)

mod2

# }

Run the code above in your browser using DataLab