[ADMB Users] help with glmmADMB 0.6.4 - function maximizer failed

Ben Bolker bbolker at gmail.com
Thu Sep 15 18:02:01 PDT 2011


On 11-09-23 01:13 PM, Rafael Mares wrote:
> Dear all
> 
> I am having problems trying to run a model using the alpha version of
> glmmADMB (0.6.4) using R (2.13.1) in Windows (thank you for catering
> to Windows users!), and I would greatly appreciate some help... maybe
> I'm missing something obvious. I apologise for the long email.
> 
> My count response variable (number of feeds) fits a negative binomial
> distribution and the explanatory variables are all continuous (except
> for 1 which is binary) and have been standardised (mean centred and
> divided by 2 standard deviations). The 2 random effects are individual
> identity (id) and observation session (rown)... observation sessions
> are unique (it's a factor using date and group identity) and always
> have more than 1 individual per session and individuals typically
> appear in more than one observation session.
> 
> This is the model I'm trying to run:
> 
> glmmadmb(pfeeds ~
> rover+pups+pupage+grpsize+rain+totalobs+grpsize:pups,
> random=~(1|rown)+(1|id), data=dat, family="nbinom")
> 
> 
> 
> --- This is the error I get when I use the full data set (number of
> observations: total=6133, rown=393, id=440):
> 
> The function maximizer failed
> In addition: Warning messages:
> 1: running command 'C:\WINDOWS\system32\cmd.exe /c "C:/Documents and
> Settings/larguser1/My
> Documents/R/win-library/2.13/glmmADMB/bin/windows32/glmmadmb.exe"
> -maxfn 500' had status 1
> 2: In shell(cmd, invisible = TRUE) :
>   '"C:/Documents and Settings/larguser1/My
> Documents/R/win-library/2.13/glmmADMB/bin/windows32/glmmadmb.exe"
> -maxfn 500' execution failed with error code 1
> 

   The best thing to do next is to run with verbose=TRUE and see if the
end of the output is informative (it may not be unless you are quite an
ADMB expert ...)

> 
> 
> --- The model with the full data set runs with ~(1|id) on it's own,
> but not with ~(1|rown) on it's own - I get the same error as above.
> Results from full data set with only ~(1|id)
> 
>              Estimate Std. Error z value Pr(>|z|)
> (Intercept)   -0.4605     0.0444  -10.36  < 2e-16 ***
> rover         -0.2483     0.0505   -4.92  8.6e-07 ***
> pups           0.1092     0.0500    2.18    0.029 *
> pupage        -0.5155     0.0483  -10.67  < 2e-16 ***
> grpsize       -0.4983     0.0627   -7.95  1.9e-15 ***
> rain           0.2759     0.0481    5.73  9.9e-09 ***
> totalobs       0.1850     0.0437    4.23  2.3e-05 ***
> pups:grpsize   0.1088     0.1303    0.84    0.404
> ---
> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> 
> Number of observations: total=6133, =440
> Random effect variance(s):
> $id
>             (Intercept)
> (Intercept)     0.49418
> 
> Negative binomial dispersion parameter: 1.2615 (std. err.: 0.079547)
> 
> Log-likelihood: -7059.28
> 
> 
> 
> --- However, using a random subset of the data (number of
> observations: total=1539, rown=89, id=368), the original model with
> both random effects runs ok (but with very different results).
> 
> Coefficients:
>              Estimate Std. Error z value Pr(>|z|)
> (Intercept)   -0.7736     0.1161   -6.67  2.6e-11 ***
> rover         -0.3265     0.2440   -1.34    0.181
> pups           0.0958     0.2272    0.42    0.673
> pupage        -0.3740     0.2049   -1.83    0.068 .
> grpsize       -0.7771     0.1932   -4.02  5.8e-05 ***
> rain           0.4118     0.2114    1.95    0.051 .
> totalobs       0.0908     0.1930    0.47    0.638
> pups:grpsize   0.4392     0.4554    0.96    0.335
> ---
> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> 
> Number of observations: total=1539, =89, =368
> Random effect variance(s):
> $rown
>             (Intercept)
> (Intercept)     0.56835
> 
> $id
>             (Intercept)
> (Intercept)     0.25791
> 
> Negative binomial dispersion parameter: 2.639 (std. err.: 0.6241)
> 
> Log-likelihood: -1627.18
> 
> 
> 
> Is there a fundamental problem with my random effects structure or is
> it a matter of changing something with "extra.args" in the model
> specification? I've played around a bit with extra.args, changing
> -mno, -ams and trying to change -maxfn, but I keep getting the same
> error for my original model with the full data set.
> 

  Can you do some bisection (i.e. try systematic tests with the first
half, last half of the data, then dropping quarters of the data, ...) or
some other systematic tests to see if particular segments of the data
are problematic?
   Have you looked at the data?
   Have you tried this in glmer with a lognormal-Poisson model, or in
MCMCglmm (ditto)?

  Ben Bolker



More information about the Users mailing list