Regression analysis of overdispersed correlated count data

Share:

Description

This function fits a multivariate negative binomial model by Maximum Likelihood and calculates robust standard errors of the regression coefficients.

Usage

1
multinbmod(formula, data, id, offset, start.coef = NULL, start.phi = NULL,control=list())

Arguments

formula

A symbolic description of the model to be fit.

data

An optional data frame containing the variables in the model. If not found in "data", the variables are taken from "environment(formula)", typically the environment from which "multinbfit" is called.

id

A vector which identifies correlated subjects. The length of "id" should be the same as the number of observations. Data are assumed to be sorted so that observations on a cluster are contiguous rows for all entities in the formula.

offset

Optional vector of offset values.

start.coef

Vector of starting values for the parameters in the linear predictor. Dafaults are set to zero.

start.phi

Overdispersion parameter. This value must be positive. Default is set to 0.5.

control

A list of parameters that control the convergence criteria. See "nlminb" for details.

Details

The marginal distribution of the j-th observation from a cluster i is assummed to be Negative Binomial with mean mu_{ij} and variance mu_{ij} + phi*mu_{ij}^2. The covariance of two observations is phi times the product of their means. The function provides robust estimates of the regression parameters.

Value

The return values is a list, an object of class "multinbfit". The componets are:

converged

Logical.

coefficients

Estimated regression coefficients.

model.coef.se

Their standard errors.

robust.coef.se

Robust estimates of standard errors.

robust.t.values

Robust t-values.

mle.phi

Estimated overdispersion parameter.

phi.se

Its standard error.

minus2.loglik

-2 x log-likelihood.

call

The function call.

Author(s)

Ivonne Solis-Trapala

References

Solis-Trapala, I.L. and Farewell, V.T. (2005) Regression analysis of overdispersed correlated count data with subject specific covariates. Statistics in Medicine, 24: 2557-2575.

Examples

1
2
3
4
5
6
id <- factor(rep(1:20, rep(5, 20)))
y <- rnbinom(100, mu = rexp(100,1)+rep(rexp(20,.3),rep(5,20)),size=2.5)
x<-rbinom(100,1,.5)
dat <- data.frame(y = y, x = x, id = id)
multinbmod(y~x,data=dat,id=id)
summary(multinbmod(y~x,data=dat,id=id,control=list(iter.max=100)))