Questions tagged [glmm]

Generalized Linear Mixed (effects) Models are typically used for modeling non-independent non-normal data (eg, longitudinal binary data).

GLMMs are a broad class of models: both linear mixed effects models and generalized linear models can be understood as special cases of GLMMs. GLMMs handle non-independence by including random effects. GLMMs are often contrasted with Generalized Estimating Equations, which may offer alternative approaches in many cases.

Related tags: multilevel-analysis, mixed-effect, random-effects-model, mixed-model, lmer, glmer, gllamm. Multilevel-analysis is an encompassing class of models. Mixed-effect and random-effects-model are used to describe a regression-like model in which the fixed effects of covariates are augmented with random effects, to be intergrated out in ML or REML estimation. Mixed-model is a linear model with a Gaussian response. lmer and glmer are R implementation in lme4 package of mixed models and GLMMs, respectively. gllamm is stata implementation of GLMMs.

893 questions
42
votes
2 answers

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 those moose were experimented on 2 or 3 times for…
Kerry
  • 1,129
  • 3
  • 14
  • 20
37
votes
2 answers

Dealing with singular fit in mixed models

Let's say we have a model mod <- Y ~ X*Condition + (X*Condition|subject) # Y = logit variable # X = continuous variable # Condition = values A and B, dummy coded; the design is repeated # so all participants go through both…
User33268
  • 1,408
  • 2
  • 10
  • 21
37
votes
3 answers

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: analyze-> generalized linear models-> generalized linear models & analyze-> mixed models-> generalized…
32
votes
2 answers

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) such as lmer and lme4 (with a log transform) as well…
30
votes
2 answers

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; # fit model fm0 <- glmer(GoalEncoding ~ 1 + Group + (1|Subject) + (1|Item), exp0, family = binomial(link="logit")) # model output summary(fm0) Subject and Item…
Nick Riches
  • 521
  • 1
  • 5
  • 12
24
votes
2 answers

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 the R package lme4 to treat it as a logistic regression problem (by specifying…
Dan Stowell
  • 1,262
  • 1
  • 12
  • 22
23
votes
1 answer

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 variable and a nested variable, where the nested variable only arises as a meaningful variable for particular values of the…
Ben
  • 91,027
  • 3
  • 150
  • 376
22
votes
5 answers

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 know whether or not the data is well described by a…
Henrik
  • 13,314
  • 9
  • 63
  • 123
20
votes
1 answer

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 and one. One can think of this variable as a probability; in fact it is probability…
amoeba
  • 93,463
  • 28
  • 275
  • 317
19
votes
2 answers

Random effect equal to 0 in generalized linear mixed model

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 surrounding area. My fixed effect is the…
Cec.g
  • 191
  • 1
  • 1
  • 4
18
votes
2 answers

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, this can be fine. Can I fit a mixed model with…
16
votes
1 answer

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 (i.e. the default in my case). I am getting a warning, and I'm curious what it means. Warning message: In optwrap(optimizer, devfun, start, rho$lower,…
Jota
  • 804
  • 1
  • 10
  • 21
16
votes
1 answer

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 count data as a response variable and I want to…
ALs
  • 297
  • 1
  • 2
  • 6
16
votes
0 answers

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 transect.id (50 transects were repeated 5 times) My response is zero-heavy - about 25% are 0s - and the non-zeroes are…
Tom Finch
  • 261
  • 2
  • 4
16
votes
2 answers

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 question as clearly as I can this time, with as much…
Brechje van Osch
  • 161
  • 1
  • 1
  • 5
1
2 3
59 60