[R-sig-ME] Specific doubts about glmer() function
db@r@cort|n@ @end|ng |rom gm@||@com
Fri Apr 19 17:36:44 CEST 2019
My name's David Bars, PhD student at the University of Lleida (Spain)
that currently I'm performing a PhD stage at one INRA research centre of
I have three particular problems/doubts in order to try to implement a
glmer model and understand it better, because I'm uncapable to solve by
I attach my microbiota raw data and R script in the next link:
Briefly, I have the count of the total number of molecules of DNA by two
times (time 1 and time 2). My response variable (DNA_pr_copies_number) is
not normal-distributed (by Shapiro - Wilk Test). Therefore I go ahead
through glmer() instead of lmer() function. HorseID is the horse studied,
so my random effect in the model.
As pointed out me Dr. Ben Bolker I had a huge change in variance from time 1
to time 2:
3 concrete doubts about my data:
1- Due to my response variable is a count, I considered as a discrete
variable. As you can see in the R script attached I used the fitdist()
function from fitdistrplus package and a negative binomial is suggested. I
performed glmer.nb() but I obtained the following error (as you can also
see in the R script). What may can cause this error???
# Error in (function (fr, X, reTrms, family, nAGQ = 1L, verbose = 0L, maxit
= 100L, :
# (maxstephalfit) PIRLS step-halvings failed to
reduce deviance in pwrssUpdate
# In addition: Warning messages:
# 1: In checkConv(attr(opt, "derivs"), opt$par, ctrl
= control$checkConv, :
# Model failed to converge with
max|grad| = 0.204772 (tol = 0.001, component 1)
# 2: In checkConv(attr(opt,
"derivs"), opt$par, ctrl = control$checkConv, :
# Model is nearly
unidentifiable: very large eigenvalue
# - Rescale
variables?;Model is nearly unidentifiable: large eigenvalue ratio
# - Rescale variables?
2- As general rule, in glmer models and due to in my model we have only one
random effect, maybe it's more recommended always to perform a
Gauss-Hermite Quadrature approximation instead of Laplace approximation
because we can perform more than one iteration?
3 - (other general doubt from other microbiote data not attached in the
I've read some posts addressing why the variance of Random effect differs
between lmer and
I'm uncapable yet to understand it.
Due to non-normality of my data, I need to use glmer, but how can I explain
that the variance of my random variable (Horse) is practically 0???
Performing an analogous analysis by lmer (assuming badly "normality")
the variance of my random variable (HorseID) increased up to 33%!!! I
think that horse, must be an important value of explaining the variance of
my model (as states lmer model).
Therefore, I perform glmer and I obtained a variance for HorseID as random
effect of 0, meanwhile performing a lmer() I obtained a variance for
HorseID as random effect of 33%. How can I assess the importance of the
random effect on my model? How can I interpret well the model?
Thanks on advance for your help/comments,
University of Lleida (Spain)
Avenue Rovira Roure, 80.
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models