[R-sig-ME] Convergence in glmmTMB but not glmer

Daniel Wright d@n|e|@wr|ght @end|ng |rom uconn@edu
Tue Oct 20 20:17:46 CEST 2020


My mistake with sending the data privately. I've re-attached my dataset in
this email.

In my analysis, I included activity as an integer using the as.interger()
function in R.

I'll give nbinom a shot and see if that fixes the problem. Thanks for the
suggestions!

Dan

On Tue, Oct 20, 2020 at 2:10 PM Thierry Onkelinx via R-sig-mixed-models <
r-sig-mixed-models using r-project.org> wrote:

> *Message sent from a system outside of UConn.*
>
>
> Daniel sent me the data in private.
>
> A couple of remarks on the dataset.
> - the response is non-integer. You'll need to convert it to integer (total
> number) and use an appropriate offset term (log(nights)).
> - make sure the factor covariate is a factor and not an integer.
>
> Please see if that solves the problem. What happens if you use a nbinom
> distribution as Ben suggested?
>
> Personally, I don't like to "standardise" covariates. It makes them much
> harder to interpret. I prefer to center to a more meaningful value than the
> mean. And rescale it by changing the unit. E.g. Age ranges from 1 to 15
> with mean 6.76. I'd use something like AgeC = (Age - 5) / 10. This gives a
> similar range as the standardisation of Age. But one unit of AgeC
> represents 10 year. And the intercept refers to Age = 5. Making the
> parameters estimates easier to interpret IMHO.
>
> Best regards,
>
> ir. Thierry Onkelinx
> Statisticus / Statistician
>
> Vlaamse Overheid / Government of Flanders
> INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
> FOREST
> Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
> thierry.onkelinx using inbo.be
> Havenlaan 88 bus 73, 1000 Brussel
> www.inbo.be
>
>
> ///////////////////////////////////////////////////////////////////////////////////////////
> To call in the statistician after the experiment is done may be no more
> than asking him to perform a post-mortem examination: he may be able to say
> what the experiment died of. ~ Sir Ronald Aylmer Fisher
> The plural of anecdote is not data. ~ Roger Brinner
> The combination of some data and an aching desire for an answer does not
> ensure that a reasonable answer can be extracted from a given body of data.
> ~ John Tukey
>
> ///////////////////////////////////////////////////////////////////////////////////////////
>
> <https://www.inbo.be>
>
>
> Op di 20 okt. 2020 om 19:40 schreef Ben Bolker <bbolker using gmail.com>:
>
> >    As Thierry says, the data would allow us to give a more detailed
> > answer.  However:
> >
> >    * the overall goodness-of-fit is very similar (differences of ~0.001
> > or less on the deviance scale)
> >
> >    * the random-effects std deve estimate is similar (2% difference)
> >    * the parameter estimates are quite similar
> >    * the standard errors of the coefficients look reasonable for glmmTMB
> > and bogus for lme4 (in any case, if there's a disagreement I would be
> > more suspicious of the platform that gave convergence warnings)
> >
> >    There's also strong evidence of dispersion (deviance/resid df > 6);
> > you should definitely do something to account for that (check for
> > nonlinearity in residuals, switch to negative binomial, add an
> > observation-level random effect ...)
> >
> >     You might try the usual set of remedies for convergence problems
> > (see ?troubleshooting, ?convergence in lme4), e.g. ?allFit.  Or try
> > re-running the lme4 model with starting values set to the glmmTMB
> > estimates.
> >
> >    Overall, though, I would trust the glmmTMB results.
> >
> > On 10/20/20 12:56 PM, Daniel Wright wrote:
> > > Hello,
> > >
> > > I'm having convergence issues when using glmer in lme4, but not
> glmmTMB.
> > > I'm running a series of generalized linear mixed effect models with
> > poisson
> > > distribution for ecological count data. I've included a random effect
> of
> > > site (n = 26) in each model. All non-factor covariates are
> standardized.
> > >
> > > The coefficient estimates of models run in glmer and glmmTMB are very
> > > similar, but models run in glmer are having convergence issues. Any
> > advice
> > > would be appreciated, as I'm not sure if I can rely on my results from
> > > glmmTMB.
> > >
> > > Attached are example of outputs from glmmTMB vs glmer:
> > >
> > >
> > > _______________________________________________
> > > R-sig-mixed-models using r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> > >
> >
> > _______________________________________________
> > R-sig-mixed-models using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> >
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>


-- 
----------------------------------------------------------------
Daniel Wright, Graduate Research Assistant
Wildlife and Fisheries Conservation Center
Depart. Natural Resources and the Environment
<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.nre.uconn.edu%2F&data=02%7C01%7C%7Cba31f0d133a24848eb3208d614ebb2f0%7C17f1a87e2a254eaab9df9d439034b080%7C0%7C0%7C636719399881397445&sdata=l3Lhp0QtBoRy5xpfyem%2FzYHmGZU0%2FHfPkq4mELHdRqE%3D&reserved=0>
University of Connecticut
Phone: 413-348-7388
Email: daniel.wright using uconn.edu


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