# Questions tagged [glmm]

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

79 questions
Filter by
Sorted by
Tagged with
2k 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 ...
47k 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: ...
18k 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; ...
19k 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 ...
18k 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 ...
8k 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 ...
19k 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) ...
9k 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 ...
18k 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

### 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 ...
2k 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 ...
2k 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: ...
2k 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 ...
47k 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 ...
11k 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 ...
30k 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 ...
3k 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, ...
9k 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 ...
8k 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 ...
290 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 ...
689 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 ...
85 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: <...
121 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), ...
8k 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 ...
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 ...
196 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 ...
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 ...
175 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 ...
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'...
835 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 ...
3k 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 ...
242 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: ...
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)...
641 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 ...
7k 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 ...
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 ...
3k 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 ...
5k 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 ...
842 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 ...
242 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 ...
2k 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 ...
5k views

### How to handle underdispersion in GLMM (binomial outcome variable)

I'm working on the following model in R: ...
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, ...
5k views

### GLMER not converging

Here is a sample of 20 rows from some data I'm working with (everything below is consistent with the full dataset): ...
1k views

### Using splines in R lme4::glmer, scale issues

Can anyone suggest how I parameterize a Poisson random-intercept model, with a natural cubic spline function? I've been using glmer for a while and am happy with ...
181 views

### Generalized linear mixed model in R [duplicate]

Possible Duplicate: 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 ...
1k views

### GLMM - between, within and nested

I'm not entirely sure of fitting the model for experiment we've made. The variables and relevant description are as follows: ID - participant ID Trial - 60 for each participant Memory - between ...
698 views

### Why are results different between MuMIn::r.squaredGLMM and piecwiseSEM::sem.model.fits?

MuMIn::r.squaredGLMM and piecwiseSEM::sem.model.fits should be preforming the same calculations. They are implementing Schielzeth and Nakagawa's R2 for generalized linear mixed effects models. However,...