[R-sig-ME] R-sig-mixed-models Digest, Vol 148, Issue 9

Ben Carlson ben@@@c@r|@on @end|ng |rom gm@||@com
Wed Apr 17 20:36:18 CEST 2019


Hello,

Regarding my earlier post, I've fixed an issue with the data (so that
stratum id is unique across the dataset) and I'm now getting two warning
errors. I've tried out various troubleshooting tactics based on the
troubleshooting vignette and google searches, but I still can't figure out
why I'm getting these warnings. I've created a reproducible example below,
and have include the output from the model summary.

If anybody has any suggestions about how I might figure out the problem I
would be most grateful!

#Reproducible example

library(glmmTMB)

download.file('https://www.dropbox.com/s/kdh30gfkwro8ba7/modeldata.rds?dl=1',
'modeldata.rds')
ssf <- readRDS('modeldata.rds')

#Fit model according to Muff et al. 2018:
https://www.biorxiv.org/content/10.1101/411801v2
TMBStruc <- glmmTMB(y ~ pct_tree + (1|stratum) + (0 + pct_tree |
individual_id:year),
                    family=poisson,data=ssf,doFit=FALSE)
TMBStruc$parameters$theta[1] = log(1e3)
TMBStruc$mapArg = list(theta=factor(c(NA,1)))

m <- glmmTMB:::fitTMB(TMBStruc); summary(m)

This is the results of summary:

Warning messages:
1: In glmmTMB:::fitTMB(TMBStruc) :
  Model convergence problem; non-positive-definite Hessian matrix. See
vignette('troubleshooting')
2: In glmmTMB:::fitTMB(TMBStruc) :
  Model convergence problem; false convergence (8). See
vignette('troubleshooting')
 Family: poisson  ( log )
Formula:          y ~ pct_tree + (1 | stratum) + (0 + pct_tree |
individual_id:year)
Data: ssf

     AIC      BIC   logLik deviance df.resid
      NA       NA       NA       NA  2541723

Random effects:

Conditional model:
 Groups             Name        Variance  Std.Dev.
 stratum            (Intercept) 1.000e+06 1000.0000
 individual_id:year pct_tree    4.218e-02    0.2054
Number of obs: 2541726, groups:  stratum, 231204; individual_id:year, 31

Conditional model:
            Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.89638         NA      NA       NA
pct_tree    -0.28095    0.03716   -7.56 4.02e-14 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Warning message:
In sqrt(diag(vcov)) : NaNs produced



> Message: 3
> Date: Mon, 15 Apr 2019 21:13:57 -0400
> From: Ben Carlson <ben.s.carlson using gmail.com>
> To: r-sig-mixed-models using r-project.org
> Subject: [R-sig-ME] glmmTMB false convergence
> Message-ID:
>         <CAEEm8-NEEZXQf=
> 9SMWGm5WUwAnFtK99nTMhu8uUnBKmJjB77Kg using mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> I'm experiencing an issue with glmmTMB and I can't figure out how to
> troubleshoot it. I'm running a model according to Muff et al. 2018:
> https://www.biorxiv.org/content/10.1101/411801v2
>
> I have movement observations of multiple animals for multiple breeding
> seasons (several thousand observations per animal per year, over 3 years),
> and I would like to allow each animal to have a different slope for each
> breeding season. This is so that I can test hypotheses regarding responses
> to habitat variables among individuals and stability within individuals
> across years. "pct_tree" is the habitat variable, representing the
> percentage of tree cover.
>
> I'm sorry I can't create a reproducible example, but I don't think I should
> post my data to a public forum. Any pointers to how I might troubleshoot
> this issue would be very helpful!
>
> I'm running the following model:
>
> TMBStruc <- glmmTMB(y ~ pct_tree + (1|stratum) + (0 + pct_tree |
> individual_id:year),family=poisson,data=ssf,doFit=FALSE)
> TMBStruc$parameters$theta[1] = log(1e3)
> TMBStruc$mapArg = list(theta=factor(c(NA,1)))
>
> The model runs, but I receive the following warning message. Based on the
> message, I'm not sure if I should trust my results:
>
> Warning message:
> In glmmTMB:::fitTMB(TMBStruc) :
>   Model convergence problem; false convergence (8). See
> vignette('troubleshooting')
>
> I have searched around but I can't find any information regarding "false
> convergence" (including the troubleshooting vignette!).
>
> Please let me know if I can provide any additional information. Thank you
> for your help!
>
> Ben

	[[alternative HTML version deleted]]



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