[ADMB Users] function maximizer failed

Ben Bolker bbolker at gmail.com
Sun Oct 9 23:46:01 PDT 2011


On 11-10-21 04:23 AM, Niklaus Kuehnis wrote:
> Am 10.10.2011 02:36, schrieb Ben Bolker:
>> On 11-10-20 09:31 AM, Niklaus Kuehnis wrote:
>>> Hi all,
>>>
>>> Trying to fit a negative binomial mixed model, the following error
>>> occurs:
>>>
>>> glmm2<- glmm.admb(intrans3 ~ hom, random = ~1, group = "nr",
>>>          data = mixed2.d, family = "nbinom", verbose = TRUE)
>>> # Error in glmm.admb(intrans3 ~ hom, random = ~1, group = "nr", data =
>>> mixed2.d,  :
>>> #   The function maximizer failed
>>> # In addition: Warning message:
>>> # In shell(cmd, invisible = TRUE) :
>>> #
>>> '"C:/Users/Username.DOMAIN/Documents/R/win-library/2.13/glmmADMB/bin/windows/nbmm.exe"
>>>
>>> -maxfn 500 ' execution failed with error code 1
>>>
>>> I tried several predictor variables, family = "poisson", adding zero
>>> inflation and different random effects. There are two lines per subject
>>> (subject id = "nr"). Intrans3 has something like a zero inflated
>>> negative binomial distribution. hom is monomodally, approximately
>>> symmetrically distributed.
>>>
>>> Is there anything wrong with my syntax?
>>>
>>
>>    Nothing is obviously wrong.
>>    Have you gotten any models to run?
> 
> Not with my data. But the example on the admb homepage runs ok
> (fit <-
> glmm.admb(y~Base*trt+Age+Visit,random=~Visit,group="subject",data=epil2,family="nbinom")).
> 
> 
  I agree with Arni that sending us the data set might be useful.

>>    What are the results of str(mixed2.d) ?
> 
> It was a data frame with variable and value labels as attributes. I
> removed the labels but the above problem persists. The output of
> str(mixed2.d) looks now like this:
> 
>> str(mixed2.d)
> 'data.frame':    212 obs. of  453 variables:
> $ nr             : Factor w/ 106 levels "1","2","3","4",..: 1 2 3 4 5 6
>      7 8 9 10 ...
> $ klasse         : int  0 5 5 5 5 5 5 5 5 5 ...
> $ datum          : num  0.00 1.35e+10 1.35e+10 1.35e+10 1.35e+10 ...
> .....
> ----------------------------
> 
> I have now upgraded to the latest version of R (2.13.2) and upgraded all
> packages. This doesn't change anything.
> 
> ----------------------------
> 
> Some more information on the data:
> 
> attach(mixed2.d)
> summary(cbind(intrans3, hom, nr))
> #     intrans3           hom               nr
> #  Min.   : 0.000   Min.   : 0.000   Min.   :  1.0
> #  1st Qu.: 0.000   1st Qu.: 2.000   1st Qu.: 27.0
> #  Median : 3.000   Median : 5.000   Median : 53.5
> #  Mean   : 4.377   Mean   : 4.961   Mean   : 53.5
> #  3rd Qu.: 6.000   3rd Qu.: 7.000   3rd Qu.: 80.0
> #  Max.   :57.000   Max.   :12.000   Max.   :106.0
> #  NA's   :29.000   NA's   : 6.000
> 
> All values of nr have frequency = 2 (two lines per subject).
> 

  I'm a little puzzled/confused about the results here. By my reading
the "mixed2.d" data frame has three variables (nr, klasse, and datum,
one of which looks like it matches the value of 'nr' quoted below, but
the other two of which are *not* used in the model.  Furthermore,
'datum' looks weird (values of 0 and 1.35e+10).  In contrast, you quote
two other variables, 'intrans3' and 'hom', that look sensible and are
*supposed* to be getting used in your model, but probably aren't
(because they're not being passed to glmm.admb in the data frame) ???

  Ben Bolker



More information about the Users mailing list