Questions tagged [glmm]
Generalized Linear Mixed (effects) Models are typically used for modeling non-independent non-normal data (eg, longitudinal binary data).
1,120 questions
52
votes
2
answers
136k
views
Dealing with singular fit in mixed models
Let's say we have a model
...
48
votes
1
answer
20k
views
How do you deal with "nested" variables in a regression model?
Consider a statistical problem where you have a response variable that you want to describe conditional on an explanatory ...
47
votes
2
answers
80k
views
How can I test whether a random effect is significant?
I am trying to understand when to use a random effect and when it is unnecessary. Ive been told a rule of thumb is if you have 4 or more groups/individuals which I do (15 individual moose). Some of ...
42
votes
3
answers
69k
views
Difference between generalized linear models & generalized linear mixed models
I am wondering what the differences are between mixed and unmixed GLMs. For instance, in SPSS the drop down menu allows users to fit either:
...
38
votes
2
answers
38k
views
Diagnostics for generalized linear (mixed) models (specifically residuals)
I am currently struggling with finding the right model for difficult count data (dependent variable). I have tried various different models (mixed effects models are necessary for my kind of data) ...
35
votes
2
answers
42k
views
Why do I get zero variance of a random effect in my mixed model, despite some variation in the data?
We’ve run a mixed effects logistic regression using the following syntax;
...
32
votes
2
answers
103k
views
r glmer warnings: model fails to converge & model is nearly unidentifiable
I have seen questions about this on this forum, and I have also asked it myself in a previous post but I still haven't been able to solve my problem. Therefore I am trying again, formulating the ...
25
votes
1
answer
41k
views
Fitting a binomial GLMM (glmer) to a response variable that is a proportion or fraction
I'm hoping somebody can help with what I think is a relatively simple question, and I think I know the answer but without confirmation it has become something I just can't be certain of.
I have some ...
24
votes
2
answers
26k
views
How to apply binomial GLMM (glmer) to percentages rather than yes-no counts?
I have a repeated-measures experiment where the dependent variable is a percentage, and I have multiple factors as independent variables. I'd like to use glmer from ...
22
votes
5
answers
26k
views
How to assess the fit of a binomial GLMM fitted with lme4 (> 1.0)?
I have a GLMM with a binomial distribution and a logit link function and I have the feeling that an important aspect of the data is not well represented in the model.
To test this, I would like to ...
21
votes
1
answer
20k
views
How to fit a mixed model with response variable between 0 and 1?
I am trying to use lme4::glmer() to fit a binomial generalized mixed model (GLMM) with dependent variable that is not binary, but a continuous variable between zero ...
20
votes
1
answer
3k
views
How are PQL, REML, ML, Laplace, Gauss-Hermite related to each other?
While learning about the Generalized Linear Mixed Models, I often see the above terms. Sometimes it seems to me these are separate methods of estimation of (fixed? random? both?) effects, but when I ...
20
votes
1
answer
8k
views
Meaning of a convergence warning in glmer
I am using the glmer function from the lme4 package in R, and I'm using the bobyqa optimizer ...
19
votes
2
answers
15k
views
Random effect equal to 0 in generalized linear mixed model [duplicate]
Sorry if I'm missing something very obvious here but I am new to mixed effect modelling.
I am trying to model a binomial presence/absence response as a function of percentages of habitat within the ...
19
votes
2
answers
11k
views
How will random effects with only 1 observation affect a generalized linear mixed model?
I have a data set in which the variable I'd like to use as a random effect only has a single observation for some levels. Based on the answers to previous questions, I've gathered that, in principle, ...
18
votes
1
answer
5k
views
Gamma hurdle model for continuous response?
I am modelling invertebrate.biomass ~ habitat.type * calendar.day + habitat.type * calendar.day ^ 2, with a random intercept of ...
16
votes
1
answer
9k
views
Why are random effects assumed to follow a normal distribution in (G)LMMs?
In short, my question is as follows:
Why is it common to assume normally distributed random effects (especially in generalized linear mixed models)?
A longer version:
Under some circumstances, an ...
16
votes
1
answer
17k
views
Calculating ICC for random-effects logistic regression
I'm running a logistic regression model in the form:
lmer(response~1+(1|site), family=binomial, REML = FALSE)
Normally I would calculate the ICC from the ...
15
votes
1
answer
19k
views
Marginal model versus random-effects model – how to choose between them? An advice for a layman
In searching for any info about marginal model and random-effects model, and how to choose between them, I have found some info but it was more-or-less mathematical abstract explanation (like for ...
15
votes
2
answers
5k
views
Are $R^2$ for GLMM useful for modelers but not necessarily for readers?
The short version:
1)Are there any published critiques of the use of $R^2$ for GLMMs, in particular the popular approach of Nakagawa & Schielzeth (2013) A general and simple method for obtaining $...
15
votes
2
answers
8k
views
How many observations do you need within each level of a random factor to fit a random effect?
I'm trying to analyse some data from a set of bird surveys. My response variable is "bird abundance", which is the number of birds counted over a five-minute period. These five-minute counts were ...
14
votes
1
answer
5k
views
Varying dispersion parameter (=dispformula) in glmmTMB in R to account for heteroscedasticity that originates from one predictor
I struggle with understanding the dispersion model and dispersion parameter of glmmTMB , and could not find answers anywhere.
I constructed a GLMM using ...
13
votes
1
answer
11k
views
What are Hommel Hochberg corrections?
I have recently been introduced to to Hommel Hochberg corrections. I am trying to find a simple explanation about what this actually is/does, but am having no luck. Can anyone please give a brief and ...
13
votes
2
answers
12k
views
Conditional vs. Marginal models
I have data with an outcome of 0 or 1 (binary) representing success or failure. I also have two comparison groups (Treatment vs. Control). Each subject in the study contributed 2 observations (the ...
12
votes
3
answers
27k
views
Fixed vs Random Effects
I have very recently started learning about Generalised Linear Mixed Models and was using R to explore what difference it makes to treat group membership as either fixed or random effect. In ...
12
votes
1
answer
13k
views
Why do Anova( ) and drop1( ) provided different answers for GLMMs?
I have a GLMM of the form:
lmer(present? ~ factor1 + factor2 + continuous + factor1*continuous +
(1 | factor3), family=binomial)
When I use <...
12
votes
2
answers
23k
views
How to test for overdispersion in Poisson GLMM with lmer() in R?
I have the following model:
> model1<-lmer(aph.remain~sMFS1+sAG1+sSHDI1+sbare+season+crop
+(1|landscape),family=poisson)
...and this is the summary ...
12
votes
1
answer
2k
views
Overdispersion and modeling alternatives in Poisson random effect models with offsets
I have run into a number of practical questions when modeling count data from experimental research using a within-subject experiment. I briefly describe the experiment, data, and what I have done so ...
11
votes
3
answers
20k
views
Generalized linear mixed models: model selection
This question/topic came up in a discussion with a colleague and I was looking for some opinions on this:
I am modeling some data using a random effects logistic regression, more precisely a random ...
11
votes
2
answers
12k
views
Effect size in GLMM
In the output of a GLMM, using a binary variable as response variable and continuous variables as explanatory variables [family = binomial(link="logit")], I obtain, for each variable, an estimate ...
11
votes
1
answer
12k
views
Model selection: can I compare the AIC from models of count data between linear and poisson models?
I am modeling count data (with offset / exposure parameter). My modeling strategy is use of a Poisson model and a negative binomial regression model. I compare model AICs, which are about -760 for my ...
11
votes
1
answer
3k
views
Likelihood and estimates for mixed effects Logistic regression
First let's simulate some data for a logistic regression with fixed and random parts:
...
11
votes
2
answers
3k
views
Generalized Linear Mixed Models: Diagnostics
I have a random intercept logistic regression (due to repeated measurements) and I would like to do some diagnostics, specifically concerning outliers and influential observations.
I looked at ...
10
votes
1
answer
5k
views
Should I exclude random effects from a model if they are not statistically significant?
Should I include random effects in a model even if they aren't statistically significant? I have a repeated measures experimental design, in which each individual experiences three different ...
10
votes
1
answer
2k
views
Why do random effects require a minimum # of levels?
I have always heard random effects require a minimum number of levels to be correctly specified in a hierarchical (mixed-effects) model. I can admit to following this rule without question (mostly ...
10
votes
1
answer
16k
views
Help interpreting count data GLMM using lme4 glmer and glmer.nb - Negative binomial versus Poisson
I have some questions regarding specification and interpretation of GLMMs. 3 questions are definitely statistical and 2 are more specifically about R. I am posting here because ultimately I think the ...
10
votes
3
answers
623
views
Bacteria picked up on fingers after multiple surface contacts: non-normal data, repeated measures, crossed participants
Intro
I have participants who are repeatedly touching contaminated surfaces with E. coli in two conditions (A=wearing gloves, B=no gloves). I want to know if there's a difference between the amount ...
10
votes
2
answers
22k
views
Should I use Poisson distribution for non-integer, count-like data?
It's my first question here, I hope I'll ask it correctly. I am trying to find out how to analyse non-integer, count data (yes!). I am looking at the effect of a given treatment on habitat suitability ...
9
votes
3
answers
9k
views
Can I test for correlation between variables before standardize them?
What I want to do is to construct GLMM's to evaluate resource selection, and I have a set of variables (some representing distances and others representing % of land cover).
Can I test for ...
9
votes
2
answers
5k
views
Why not always use generalized estimating equations (GEE) instead of linear mixed models?
I read about generalized estimating equations (GEE) here, here and at other sites.
It is mentioned in first of above links that "the parameter estimates are nearly identical" for linear ...
9
votes
4
answers
2k
views
Is it mandatory to subset your data to validate a model?
I'm having a hard time getting on the same page as my supervisor when it comes to validating my model. I have analyzed the residues (observed against the fitted values) and I used this as an argument ...
9
votes
1
answer
13k
views
How to account for repeated measures in glmer?
My design is as follows.
$y$ is Bernoulli response
$x_1$ is a continuous variable
$x_2$ is a categorical (factor) variable with two levels
The experiment is completely within subjects. That is, each ...
9
votes
1
answer
5k
views
Resolving heteroscedasticity in Poisson GLMM
I have long-term collection data, and I'd like to test, whether the number of animals collected is influenced by weather effects. My model looks like below:
...
9
votes
1
answer
12k
views
Interactions between random effects
I'm considering a mixed-effects model to try to understand factors that influence the number of ticks sampled on wild rodents. My data is nested so that I have one tick count per rodent, multiple ...
9
votes
0
answers
2k
views
When and why do I have to use "trait" for multinomial multilevel models with MCMCglmm in R?
I want to estimate a multilevel multinomial logit model but I am struggling with the terminology and notation used by the R-package MCMCglmm. There is documentation ...
8
votes
3
answers
9k
views
Checking a beta regression model via glmmTMB with DHARMa package
I would like some clarification whether my model is well specified or not (since I do not have much experience with Beta regression models).
My variable is the percentual of dirth area in the denture....
8
votes
1
answer
6k
views
Correct estimation of arguments for glmmLasso function
I am using glmmLasso for variable selection. In my case, n is slightly less than p and ...
8
votes
2
answers
235
views
How can I use a variable as a covariate which exists only for specific range for some clusters/groups?
I want to know how to use Poisson GLMMs when we have unequal samples available for different groups/clusters/participants in data.
Imagine a study where each of the 60 participants are given 1000 ...
8
votes
2
answers
3k
views
Metric as straightforward as R^2 for Bayesian models
So, the beauty of the $R^2$ in linear models or the deviance-based pseudo-$R^2$ from GLMs is their intuitive interpretation for non-specialists. There's also some nice developments on this front for ...
8
votes
1
answer
225
views
Linear mixed model or Generalized linear mixed model
I have a dataset with repeated measures, different individuals each have six appointments in total. The outcome variable is continuous. I want to know if I should use a GLMM or a LMM to see what the ...