[R-sig-ME] Zero inflated negative binomial mixed models - glmmADMB help

dave fournier davef at otter-rsch.com
Fri Mar 11 18:14:26 CET 2016


I like to use to save.dir option of glmmadmb and run models from the 
command line
using the file glmmadmb.dat and glmmadmb.pin.

If you run the model from the command line and look at the
eigenvalues of the Hessian in the file glmmadmb.eva you will see
     unsorted:     0.8299209075 0.8342404973 0.7590373248 0.7698518484 
0.7273714834 0.8736779466 0.6861389165 0.6374567379 0.9724466982 
-4.668064218e-06 0.004088060076 0.001527386956 0.2224415205
       sorted:     -4.668064218e-06 0.001527386956 0.004088060076 
0.2224415205 0.6374567379 0.6861389165 0.7273714834 0.7590373248 
0.7698518484 0.8299209075 0.8342404973 0.8736779466 0.9724466982

So there is one (slightly) negative eigenvalue.
there are a number of things one can try such as restarting the model 
from the
final estimates with

    ./glmmadmb -maxph 5 -phase 5 -binp glmmadmb.bar

but this does not solve the problem. It turns out that running the model
from the beginning with a stricter convergence criterion does produce
a positive definite Hessian.

  ./glmmadmb -maxph 5  -crit 1.e-8

gives a glmmadmb.eva file with
     unsorted:     0.7502190194 0.7626161871 0.7216672407 0.8250394871 
0.8315459284 0.8631699305 0.6817678360 0.6341003013 0.9476416352 
0.2247847266 9.978823284e-06 0.001435942771 0.004023239570
       sorted:     9.978823284e-06 0.001435942771 0.004023239570 
0.2247847266 0.6341003013 0.6817678360 0.7216672407 0.7502190194 
0.7626161871 0.8250394871 0.8315459284 0.8631699305 0.9476416352


adding the option -eigvec includes the eigenvectors of the Hessian.

  ./glmmadmb -maxph 5 -crit 1.e-8 -eigvec

then the eva file looks like
     unsorted:     0.7502190194 0.7626161871 0.7216672407 0.8250394871 
0.8315459284 0.8631699305 0.6817678360 0.6341003013 0.9476416352 
0.2247847266 9.978823284e-06 0.001435942771 0.004023239570
    0.7502190194   0.7626161871   0.7216672407   0.8250394871 
0.8315459284   0.8631699305   0.6817678360   0.6341003013 0.9476416352   
0.2247847266 9.978823284e-06 0.001435942771 0.004023239570
  3.145751248e-05 -0.02229426701  -0.6439166902   0.4165291489 
-0.2349975122   0.3378538346  -0.3627220631  -0.1375767378 0.2092747212  
-0.2021974178 -0.08252179794 0.004892490007 0.0007365404429
  -0.0001627581714 -0.02292054239  -0.2533111690   0.3418924618 
0.03267828005  -0.7301316450   0.1209804739   0.4006587038 
-0.05379681904  -0.1784520056  -0.2726715930 0.0006368161115 0.002106698598
  6.905271438e-05 -0.01094136597  -0.1616308706  -0.1170460172 
0.7988984662  0.06758963263  0.02241602484  -0.1049373653 0.02046180512  
-0.5386081221   0.1233033278 0.003460024640 0.001204016299
  0.0003480524365 0.003719457042   0.1111906466   0.1428914105 
-0.08189325289  -0.4118421907   0.1726200229  -0.7685910283 0.4039533028 
-0.04965863296  0.06856538114 0.002760235874 -0.001145571029
  0.0003922122329 -0.001039509669   0.2633796300  0.01139584203 
-0.4343527695  0.06770277471   0.1747624011   0.2663334861 0.1867854796  
-0.6627218740   0.4021039370 0.0007643489613 -0.001181539429
  -0.0001962079647 -0.006193603101 -0.03602279601  -0.3456553725 
-0.2750993786  -0.1978416834  -0.3326903098  -0.3278134635 
-0.6216010012  -0.3601442675  -0.1735738092 0.0005875992569 0.0009502102918
  -1.801921268e-05  0.02586284264   0.5897627612   0.2877836172 
0.1046648012   0.1632217687  -0.2925115862  0.01356523316 0.1518946287  
-0.2138105138  -0.6136230469 0.005151299186 -0.001335903862
  5.543672656e-05  0.05185388996 -0.006611299676   0.4170181174 
-0.02602451139   0.3035901652   0.6582827082  -0.1964552396 
-0.4819848060 -0.07565901091  -0.1433677854 -0.0003094013723 
-0.0004959787966
  -0.0009915469361  0.03224097595   0.2492459149   0.5458924492 
0.1508893953  -0.1243502158  -0.4036042697 -0.03639258080 
-0.3348481523   0.1191998766   0.5568003123 0.004954228709 0.001733212413
  0.008029938584  -0.9971258920  0.04538382883  0.03359505616 
0.003830672944  0.02411983117  0.02119394632 -0.01714560983 
-0.03042769214  0.01163740729 0.002302755985 -0.003233574812 0.008398091508
    0.9928784299 0.006992077633 -0.0004539774337 0.0003402247550 
0.0003997625959 -0.0005470094690 -0.0009410663612 0.0003558416009 
-0.0006377696486 0.0002107506719 0.0003414248073 -0.006399120457 
-0.1187443667
   -0.1177436265 -0.009601421062 -0.001660259044 0.0004870104068 
0.001146729502 -0.001348434808 -0.0006452870809 0.0009410093944 
-0.002049145507 0.0002844653223 0.0006418773714  0.08304885626 -0.9895125153
   0.01621880363 -0.002512232778 -0.0006114832900 -0.006059549890 
-0.002298758632 -0.0001654826189 0.005049402423 0.002819847138 
-0.001161996960 0.004339845308 7.078884217e-05   0.9964714971 0.08172608698

where I have deleted some lines so that only the unsorted eigenvalues and
the eigenvectors (in the same order) are included.  The small
eigenvalue is third from the last so that corresponding eigenvector is
    0.9928784299 0.006992077633 -0.0004539774337 0.0003402247550 
0.0003997625959 -0.0005470094690 -0.0009410663612 0.0003558416009 
-0.0006377696486 0.0002107506719 0.0003414248073 -0.006399120457 
-0.1187443667

Note that is is almost entirely the first component.  check the par file,
glmmadmb.par
# Number of parameters = 13  Objective function value = 1183.16 Maximum 
gradient component = 1.55143e-07
# pz:
0.0267768011007
# beta:
  3.80217042534 2.99365228295 2.14620977832 0.693168837684 1.48188509460 
1.41704108724 -1.20474431384 -2.72872529388 1.22958281355 0.907826960877
# tmpL:
  -1.27434816223
# tmpL1:
  0.000100000000000
# log_alpha:
0.365496270825
# u:
  0.883421752157 0.725093568164 0.515818718059 -0.252695513091 
0.376963076134 0.139381634514 1.50020943187 0.277631810913 
0.130374031442 0.289427299208 0.581103164117 0.174844539661 
-0.322991242902 -0.119327510643 0.967346420700 1.31812402912 
-0.502539361904 -1.03457222137 -1.14964617640 -0.0617951773726 
-0.866160795582 -1.16221633966 -1.65553226247

and you will see that it corresponds to the first parameter pz which is the
zero inflation parameter.  So it is saying that the model response to the
zero inflation is very small. and slightly confounded with the last 
parameter,
which is the overdispersion parameter.  This makes sense as it is saying 
that
the model can account for extra zeroes either my adding zero inflation or
by changing the overdispersion a bit.

Now lets turn off zero inflation and fit the model.
the par file is

# Number of parameters = 12  Objective function value = 1183.21 Maximum 
gradient component = 1.43850e-07
# pz:
0.0200000000000
# beta:
  3.06300647659 3.03459572371 2.10955237321 0.651987307491 1.53607380969 
1.51288805518 -1.24056997621 -2.65942119162 1.20265939317 0.869632910773
# tmpL:
  -1.26543720173
# tmpL1:
  0.000100000000000
# log_alpha:
0.393160445395
# u:
  0.921344073078 0.774702834115 0.492811643199 -0.243814794142 
0.387638751447 0.139004323059 1.50021679322 0.271472152608 
0.130845912349 0.258548576465 0.585278999357 0.157099308388 
-0.345577809207 -0.130590600526 0.977640503202 1.32244233265 
-0.485656349901 -1.03509274755 -1.14782075617 -0.0389045698289 
-0.878875283217 -1.16385512772 -1.64533137464

So comparing the log-likelihoods (minus Objective function values)
one sees that the difference is only 0.05, so that zero inflation is
not significant.

# Number of parameters = 13  Objective function value = 1183.16 Maximum 
gradient component = 1.55143e-07
# pz:
# Number of parameters = 12  Objective function value = 1183.21 Maximum 
gradient component = 1.43850e-07



More information about the R-sig-mixed-models mailing list