[R-sig-ME] a GlmmTMB advice

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Mon May 25 18:41:30 CEST 2020

On 5/20/20 11:19 AM, Leida Dos Santos wrote:
> Hello there, I was wondering if you help. I am still learning how to work
> with GlmmTMB and I have fitted GlmmTMB before but for categorical data . I
> currently am working on a paper and have a data set where I am trying to
> fit a GlmmTMB. I want to show the effect climate data on species richness
> and abundance . I have fitted the predictor response with species "Richness
> Index" and another with "abundance ", and predictor variables "climate
> data" such as tmax, tmin, precipitation (Richness index I calculated using
> vegan package). I have fitted (site and Month) as random intercept, because
> the data was collected with no consistency but random days and month, and
> years (2010-2019).

    does the Month variable include both month and year (e.g. 
2010.April, 2018.May)?

>   There are 19 different specimens

     Not sure what this means ...

>   and n= 467. All
> variables are numerical. #Global Model example: Abun_2<- glmmTMB(Richness ~
> (tmin +ppt1 + tmax1 + tmax2 +tmin2+ ppt2 + Year)^2+ (1|Site/Month),
> data=Main_data, family="nbinom2"). However when I run this model, I come
> across some warning messages:
> "Found more than one class "Matrix" in cache; using the first, from
> namespace 'Matrix'
> Also defined by ‘arkhe’

    This is harmless is in this case (although it seems like a 
questionable decision on the part of the arkhe package developers).

> Warning messages:
> _1: In glmmTMB(Abundance ~ (tmin + ppt + tmax2 + tmax + tmin2 + ppt2 + :
> non-integer counts in a nbinom2 model
> 2: In fitTMB(TMBStruc) :
> Model convergence problem; non-positive-definite Hessian matrix. See
> vignette('troubleshooting')
> 3: In fitTMB(TMBStruc) :
> Model convergence problem; function evaluation limit reached without
> convergence (9). See vignette('troubleshooting')".
> I checked vignette, but the truth is, this is too advanced for and I do not
> understand what it is saying:) I would love to have some feedback with
> regards to the model. Additionally, should I use just count for Richness
> instead of the Menhinick index for richness? Or should I use a completely
> different model? I

    The main issue here is that it almost never makes sense to use a 
count-based model (nbinom1, nbinom2, Poisson) for data that are not 
actual counts (i.e. integers).  I'm not going to weigh in on which 
index/model you should use; there are long discussions about that, and 
you should decide as much on biological grounds (what question are you 
trying to answer?) as statistical grounds.  As long as the model 
converges to a stable answer, and the assumptions of linearity and 
homoscedasticity are reasonably well met, you should be OK statistically.

>   would be very grateful for any feedback please:):) Thank
> you in advance. :x

> *Leida Dos Santos*
> *BSc**,QTS,MSc,**PhD*
> *IUCN SSC ASG Programme Officer*
> *ldossantos using amphibians.org <ldossantos using amphibians.org>*
> *leidamphibian using gmail.com <leidamphibian using gmail.com>*
> *@anfileida*
> *http://www.amphibians.org/ <http://www.amphibians.org/>*
> *http://www.nzfrogs.org <http://www.nzfrogs.org>*
>         *0  0*
> *      ( -- )  /\(      )/\^^  ^^  ^^  ^^**PS: Please consider the
> environment before printing this E-mail*
> 	[[alternative HTML version deleted]]
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

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