Learn R Programming

multinbmod (version 1.0)

multinb.fit: Multivariate negative binomial model with robust estimation of regression coefficients

Description

This function is called by "multinbmod", but it can also be called directly

Usage

multinb.fit(y, x, offset=1, id, start.par, control=list())

Arguments

y
Response vector.

x
Design matrix of covariates.
offset
Optional vector of offset values.
id
Variable indicating which subjects are correlated.
start.par
Vector of starting values for the parameters in the linear predictor (defaults to zero) and the overdispersion parameter (default to 0.5).
control
A list of parameters that control the convergence criteria. See "nlminb" for details.

Value

estimated regression coefficients
se from model
Estimated standard errors of regression coefficients.
robust se
Robust estimate of standard errors of regression coefficients.
t-values
Robust t-values.
covariance of beta estimates from model
Estimated covariance of estimated regression parameters.
robust covariance of beta estimates
Robust estimate of covariance of estimated regression coefficients
estimated phi
ML estimate of overdisperision parameter.
se(phi)
Its standard error.
-2 x log-likelihood
converged?
Logical.
iterations
Number of iterations required for convergence.

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.

See Also

multinbmod

Examples

Run this code
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)
multinb.fit(y,cbind(1,x),id=id)

Run the code above in your browser using DataLab