Questions tagged [glmm]

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

107 questions
Filter by
Sorted by
Tagged with
5k 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 ...
54k 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: ...
64k views

Dealing with singular fit in mixed models

Let's say we have a model ...
25k 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; ...
21k 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 ...
11k 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 ...
25k 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 ...
24k 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) ...
5k 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 ...
114 views

Both variables of my GLMM output are significant. Don't know how to interpret it?

This is more of an interpretation question than anything. I have run a GLMM with two fixed factors (both of which have two levels) and two random factors. The outputs from the model are as such: <...
11k 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 ...
21k 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 ...
4k 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, ...
3k views

Should quantitative predictors be transformed to be normally distributed?

I am always struggling with normality testing for quantitative predictors (no factors) and transforming them to normality. If I am running a GLMM and my predictors are really non-normal, should I ...
57k 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 ...
3k 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: ...
3k views

Accounting for time in repeated measures glmm, R

I have some count data of advanced stage juvenile snails in tanks that are sampled every 4 days for 4 sample points. I want to see how much the snail development stages change with a changing dosage ...
697 views

Computation and interpretation of marginal effects in a GLMM

I am currently working on a GLMM model which uses a Poisson distribution and need to compute and interpret marginal effects from this model. The model outcome consists of a count (COUNT) collected ...
13k 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 ...
49k 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 ...
12k 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 ...
9k 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 ...
543 views

Which random effects to include in this GLMM?

In my study growth of plants was measured in different years on different plots (all plants were measured in all years). The question I'd like to answer with my model is: Which factors influence ...
815 views

Logit link in GLM and inverse logit

I am calculating a generalized linear mixed model (GLM) with a two-column (n successes/failures) binomial response using the the lme4 package in ...
140 views

Prediction using fixed effects in glmm

I have the following generalized linear mixed effects model (mcmcglmm in R) with data based on this paper. Sex is a two level factor (M or F), ...
23k 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 ...
9k 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 ...
806 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 ...
1k 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 ...
9k views

Conditional logistic regression vs GLMM in R

I have paired data (GWAS case/control study) and I have heard using conditional logistic regression or generalized linear mixed models (GLMM) is appropriate. Which should I use in this case? Why would ...
3k views

Modeling reaction time with glmer

According to Lo and Andrews, 2015 (https://doi.org/10.3389/fpsyg.2015.01171) raw Reaction Time (RT) should be analyzed with a GLMM, instead of transformed values with LMM or even ANOVA. They and ...
2k views

Negative binomial vs binomial distribution for proportion data

I'm sorry if this is a duplicate question; I searched around for an answer for some time, but couldn't find anything. I want to build a model in R, with the proportional number of individuals ('count'...
1k views

Adding an observation level random term messes up residuals vs fitted plot. Why?

I run a mixed effects generalized model for proportional data (response variable). I used binomial family and logit link function. I suffered from overdispersion so I added an observation level random ...
8k views

Order of nested random effects in lme4

I just fit a model in lme4, and I'm wondering what the heck I fit... I have individuals id, and each is measured pass/fail on items that can be described using two ...
944 views

GLMM multilevel (hierarchical) model

I want to study the classroom and the school effect/result on the pupil's success (or not) at school. I also want to know the effect of the age, the gender (of the pupils) and if the pupils have or ...
5k 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 ...
294 views

Time Series of Wound Healing percentages / proportions

I am looking at wound healing over time and have hit a wall with analysis. My data consist of injury cases which are tracked over time. Injury healing is measured as percentage wound area/perimeter ...
4k views

Testing whether random effects are normally distributed in R

I've been working on a GLMM in R and I see that an assumption of the test is that the random factor must be normally distributed (that is, unless you're using a package like ...
5k views

Generalized Linear Mixed Model in R with repeated measures

I am trying to investigate how four variables (var1=continuous, var2=factor, var3=factor, var4=continuous) influence the number of trials individuals approached (out of total nr of trials --> binomial)...
870 views

Zero-truncated Poisson model

In the theory of generalised linear models, you may use the exponential family to find the mean and variance of certain distributions. How would the mean and expectation of the zero-truncated Poisson ...
250 views

How to interpret the results from random coefficient Poisson data analysis

I have fitted random coefficient Poisson analysis in R. I have obtained the following results: ...
2k views

Crossed fixed effects model specification including nesting and repeated measures using glmm in R

Background: I am interested in looking at the effects that Culture, Treatment and Time have ...
14k 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 ...
10k 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 ...
4k views

What are the assumptions of a Gamma GLM or GLMM for hypothesis testing?

What are the assumptions when doing hypothesis testing using a Gamma GLM or GLMM? Are the residuals suppose to be normally distributed and is heteroscedasticity a concern like the Gaussian (normal) ...
6k views

Nested random effects in lme4 R

Background: I have data on time to infection across multiple sites across a gradient. The design involves 2 latitudes (In and Out) with sites 1 and 2 nested within “In” and sites 3 and 4 nested within ...
3k views

In what sense is the interpretation of coefficients in a GLMM subject-specific?

There is something I'm not quite understanding conceptually about the output from generalized linear mixed models. I have read that the target of inference in GLMMs is subject-specific. For example, ...
1k views

Intraclass correlation with count data

I want to calculate the ICC between 3 different measurements where the dependent variable is a count. As far as I understood, if the data were normally distributed, I would use a repeated measures ...