Negative Binomial Loglinear Mixed Model Example



ADMB Files for full model
Code: negbin1.tpl
Data: epil.dat
Initial values: negbin1.pin
All required files (DOS): logistic.zip
All required files (linux): logistic.tar.gz
Results: logistic.par
R (S-Plus) scripts: logistic.s

ADMB Files for simpler model
Code: negbin2.tpl
Data: epil.dat
Initial values: negbin1.pin
All required files (DOS): logistic.zip
All required files (linux): logistic.tar.gz
Results: logistic.par
R (S-Plus) scripts: logistic.s

Running ADMB-executables
In a DOS window
Under linux

Command line options:
-l1 10000000 -l2 100000000
-l3 10000000 -nl1 10000000

WinBUGS files
Code (ascii text): bugs.txt
Data (ascii text): data.txt
Initial values (ascii text): inits.txt

Results: Computation times
ADMB-RE: 27 seconds.
WinBUGS: 700 seconds.

Model Description

The negative binomial mixed model can be used instead of the poisson regression to investigate whether there is overdispersion in the data, that is whether the variance of the obsevations is greater than that which would be expected for a poisson distributed random variable. Parameter estimation for such models is generally claimed to be difficult. See for example R-help the mailing list archives of the statistical modeling language R. The data used in this example are the epilepsy data considered in Venables and Ripley Modern applied statics with S 4th edition. and by Booth et al. Negative Binomial Loglinear Mixed Models.

Comparison with SAS NLMIXED

Booth et al. attempt to fit two negative binomial loglinear mixed models to the data, the "full model" and a simpler model. for the full model they report:

The fit of the full negative binomial model using NLMIXED was very unstable. Different starting values led to different estimates and very different standard errors.

Booth et al also apply a "Monte Carlo EM algorithm to the full model and report:

Application of the MCEM algorithm in this problem suggest that the random slope is 0. The MCEM algorithn was run for a large number of iterations with all of the estimates except for slope variance and the covariance converging quickly. These latter two estimates appear to be slowly convergin toward 0.

We coded the full model in ADMB-RE and noted quick convergence (15 seconds) with the slope parameter converging to 0. However if the variance of the slope parameter is 0 then the covariance parameter is undefined so we removed that parameter and fit the model again. This model converged quickly (15 seconds) to the ML estimates. We used different starting values to investigate the stability of the model and found that it conveged to the same values each time. Thus is would appear that the performance of ADMB-RE is superior to SAS NLMIXED for this problem. The ADMB-RE code

The R (S-Plus) script used to generate data in the input format for both WinBUGS and ADMB-RE can be found here: logistic.s. You can modify this script to generate new datasets.