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
11
votes
1answer
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 ...
35
votes
3answers
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: ...
24
votes
2answers
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; ...
22
votes
2answers
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 ...
9
votes
1answer
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 ...
15
votes
1answer
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 ...
26
votes
2answers
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) ...
18
votes
2answers
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 ...
19
votes
4answers
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 ...
5
votes
2answers
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 ...
4
votes
1answer
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 ...
8
votes
1answer
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: ...
1
vote
1answer
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 ...
36
votes
3answers
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 ...
11
votes
1answer
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 ...
8
votes
2answers
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 ...
15
votes
1answer
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, ...
13
votes
1answer
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 ...
8
votes
1answer
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 ...
1
vote
1answer
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 ...
3
votes
1answer
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 ...
2
votes
1answer
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: <...
0
votes
1answer
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), ...
10
votes
1answer
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 ...
5
votes
0answers
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 ...
3
votes
1answer
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 ...
3
votes
1answer
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 ...
3
votes
1answer
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 ...
3
votes
1answer
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'...
1
vote
1answer
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 ...
5
votes
1answer
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 ...
1
vote
0answers
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: ...
1
vote
0answers
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)...
1
vote
1answer
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 ...
9
votes
1answer
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 ...
4
votes
1answer
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 ...
3
votes
1answer
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 ...
4
votes
1answer
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 ...
2
votes
1answer
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 ...
11
votes
1answer
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 ...
8
votes
1answer
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 ...
4
votes
1answer
5k views

How to handle underdispersion in GLMM (binomial outcome variable)

I'm working on the following model in R: ...
3
votes
1answer
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, ...
2
votes
1answer
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): ...
2
votes
1answer
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 ...
0
votes
0answers
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 ...
5
votes
1answer
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 ...
4
votes
1answer
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,...
3
votes
1answer
12k views

How to build a Mixed Effects Logistic regression Model?

I am new to data analysis and now working on a Mixed Effects Logistic Regression Model. Currently, I have the following data frame (model_data): ...
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 ...