multinb.fit: Multivariate negative binomial model with robust estimation...

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/multinbmod.r

Description

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

Usage

1
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

The return values is a list with components:

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.

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.

See Also

multinbmod

Examples

1
2
3
4
5
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)

Example output

$`estimated regression coefficients`
        V1          x 
 1.5924262 -0.1352033 

$`se from model`
       V1         x 
0.1569822 0.1042238 

$`robust se`
       V1         x 
0.1615292 0.1020012 

$`robust t-values`
       V1         x 
 9.858443 -1.325507 

$`covariance of beta estimates from model`
                        x
   0.02464341 -0.00470229
x -0.00470229  0.01086260

$`robust covariance of beta estimates`
                        x
   0.02609168 -0.00622219
x -0.00622219  0.01040424

$`estimated phi`
[1] 0.4089209

$`se(phi)`
[1] 0.1362344

$`-2 x loglikelihood`
[1] 614.4774

$`converged?`
[1] TRUE

$iterations
[1] 11

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