Questions tagged [glmm]

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

Filter by
Sorted by
Tagged with
41
votes
2answers
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 ...
35
votes
3answers
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: ...
32
votes
2answers
64k views

Dealing with singular fit in mixed models

Let's say we have a model ...
30
votes
2answers
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) ...
28
votes
2answers
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; ...
22
votes
2answers
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 ...
22
votes
5answers
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 ...
19
votes
2answers
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 ...
19
votes
1answer
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 ...
19
votes
1answer
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 ...
18
votes
2answers
5k 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, ...
16
votes
2answers
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 ...
16
votes
1answer
6k 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 ...
13
votes
1answer
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 ...
13
votes
1answer
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 ...
13
votes
1answer
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 ...
13
votes
0answers
3k 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 ...
12
votes
1answer
811 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 ...
12
votes
2answers
20k 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
1answer
1k 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
1answer
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 ...
11
votes
2answers
2k 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
3answers
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 ...
10
votes
1answer
3k 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 ...
10
votes
3answers
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 ...
10
votes
1answer
10k 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 <...
10
votes
2answers
4k 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 ...
10
votes
2answers
2k 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 $...
9
votes
1answer
3k 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 ...
9
votes
1answer
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 ...
9
votes
3answers
312 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 ...
9
votes
2answers
13k 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 ...
8
votes
4answers
1k 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 ...
8
votes
3answers
1k 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 ...
8
votes
2answers
496 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 ...
8
votes
1answer
10k 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, ...
8
votes
1answer
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: ...
8
votes
1answer
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 ...
8
votes
2answers
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 ...
8
votes
1answer
565 views

Suspiciously high shrinkage in random effects logistic regression

Consider the following simple example: ...
8
votes
1answer
832 views

How close to zero should the sum of the random effects be in GLMM (with lme4)

I'm using the lme4 package in R to do some logistic mixed-effects modeling. My understanding was that sum of each random effects should be zero. When I make toy ...
8
votes
1answer
2k views

Likelihood and estimates for mixed effects Logistic regression

First let's simulate some data for a logistic regression with fixed and random parts: ...
7
votes
1answer
109 views

Poisson distribution complications with proportions, GLMM

In order to analyse which factors have greater weight in the proportion of incidence (number of infected inidivuals against total individuals) difference within different habitats a Generalized linear ...
7
votes
2answers
283 views

Confused about meaning of subject-specific coefficients in a binomial generalised mixed-effects model

In *A Comparison of Cluster-Specific and Population-Averaged Approaches for Analyzing Correlated Binary Data*, Neuhas, Kalbfleisch, and Hauck state: "With the cluster-specific approach, the ...
7
votes
1answer
1k views

Specifying model in glmer() - interaction terms

I am running a generalised mixed effects model, of family logistic regression, using function glmer(). I am predicting likelihood of response (0/1) and my fixed effects to explore in my final model ...
7
votes
1answer
141 views

How to interpret GLMM results?

My question is related with my previous post Extract variance of the fixed effect in a glmm. However, in this case I change the model that the GLMM follow. It follows a log family and as there are ...
7
votes
1answer
1k views

GLMM overfitting solutions

in GLMM faq page http://glmm.wikidot.com/faq there is a statement about overfitting: "One alternative (suggested by Robert LaBudde) is to "fit the model with the random factor as a fixed effect, get ...
7
votes
1answer
758 views

GLMM and two slopes

My outcome variable is binomial, and I have 11 independent variables and a time variable. The time variable has different slopes, so I fixed it to time-before and <...
7
votes
2answers
1k views

Translate glmer (lme4) model specification into MCMCglmm

I am having some computational trouble estimating the following model with the glmer function in lme4: ...
7
votes
1answer
6k views

How to assess overdispersion in Poisson GLMM, lmer( )

I have a GLMM with Poisson distribution and random spatial block. My experimental design is 2x2 factorial, with 4 blocks, resulting in 16 total data points. Here is the specification of the model in R ...

1
2 3 4 5
18