multinbmod: Regression analysis of overdispersed correlated count data In multinbmod: Regression analysis of overdispersed correlated count data

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)))

Example output

\$converged
 TRUE

\$coefficients
(Intercept)           x
1.53833193 -0.02170584

\$model.coef.se
(Intercept)           x
0.2105123   0.1034934

\$robust.coef.se
(Intercept)           x
0.2024787   0.1787348

\$robust.t.values
(Intercept)           x
7.5974989  -0.1214416

\$mle.phi
 0.7836865

\$phi.se
 0.2416097

\$minus2.loglik
 568.2496

\$iterations
 10

\$call
multinbmod(formula = y ~ x, data = dat, id = id)

attr(,"class")
 "multinbmod"
\$call
multinbmod(formula = y ~ x, data = dat, id = id, control = list(iter.max = 100))

\$converged
 TRUE

\$coefficients
Estimate   ModelSE  RobustSE   Robust.t
(Intercept)  1.53833193 0.2105123 0.2024787  7.5974989
x           -0.02170584 0.1034934 0.1787348 -0.1214416

\$MLE_of_phi
 0.7836865

\$SE_of_phi
 0.2416097

\$minus2.loglik
 568.2496

\$iterations
 10

attr(,"class")
 "summary.multinbmod"

multinbmod documentation built on May 2, 2019, 4:21 a.m.