Questions tagged [glmm]
Generalized Linear Mixed (effects) Models are typically used for modeling non-independent non-normal data (eg, longitudinal binary data).
1,120 questions
7
votes
3
answers
527
views
Extreme outlier in real data
I'm looking at the amount of carbon in seven forest pools. For dead trees left on the landscape across many locations and over several harvest retention (logging) treatments, there is an extreme value ...
0
votes
0
answers
32
views
Comparing to zero in emmeans pairwise comparisons?
I'm analyzing data on daily foraging dynamics of animals in different treatments feeding on a diet consisting of two different qualities (high and low) using R. The problem arises when there are days ...
3
votes
1
answer
75
views
Confounding due to minimal covariate overlap in glmm
I'm analyzing an ecological dataset of nutrient concentrations (continuous) across seven stations (each station is nested within one of three sites). We also have ~60 samples from each station where ...
0
votes
0
answers
35
views
ANCOVA or GLMM for logistic regression with fixed and random effects
I'm running an experiment where subjects need to determine if a test-image is identical or different from their (memorized) target-image. The images are divided between categories (e.g. ...
0
votes
0
answers
83
views
How to solve a binary logistic mixed effects model when there is unbalanced data and different variance structure with repeated measures?
Problem Description:
I want to fit a generalized linear mixed-effects model with a binary response (i.e., a Binary logistic mixed-effects model) where there are nested random effects, and each nested ...
0
votes
0
answers
37
views
Residual issues in binomial GLMM when including random effect
I'm working on a dataset of ~2900 fish, where the visually estimated sex was compared to the true sex. In about 10% of the cases (≈260 fish), the estimation was wrong (deviation = TRUE).
I'd like to ...
0
votes
0
answers
57
views
Parametric bootstrap for multiple comparisons for glmm
When doing post-hoc treatment comparisons with the results from a glmm it is typical in my industry to use PROC GLIMMIX, method=rspl, ddfm = kr, and whatever control method is appropriate (ex. Tukey, ...
3
votes
1
answer
95
views
Standardizing effectsizes in a two-level logistic mixed model with highly unbalanced clusters: advisable? How to compare effect sizes?
I’m fitting a two-level logistic mixed model with a random intercept and only level-1 predictors. The data are highly unbalanced across clusters: 266 observations in 25 clusters with sizes like:
...
2
votes
0
answers
94
views
How to use LASSO shrinkage methods using glmnet for a GLMM model
I am fairly new to more complex statistics and I'm trying to get my head round appropriate variable selection methods including Lasso shrinkage, so would really appreciate any help and guidance ...
0
votes
0
answers
76
views
How to specify the random-intercepts for states and districts nested within the states in glmmTMB?
This question is related to the selection of appropriate model strategy. My dataset has 2500 rows of district-level data of disease counts (number of cases). The response variable is number of cases. ...
0
votes
0
answers
37
views
Binary repeated measures outcome with rare events?
I have a binary repeated measures outcome with rare events. In particular, when comparing the outcome between different groups, sometimes the Odds ratios can blow up to infinity due to sparsity/rare ...
2
votes
0
answers
69
views
Why are the point estimates of estimated marginal means from a Bayesian binomial GLMM so different in the presence of residual covariance?
As the question title says, I am confused why the estimated marginal means (obtained using emmeans()) for a Bayesian binomial generalized linear mixed model are so ...
0
votes
0
answers
69
views
Understanding differences in predictions with and without bias correction
My understanding of this topic has been cobbled together from various package vignettes (e.g., here and here) and other stackexchange posts (e.g., here). The information therein has been very helpful, ...
5
votes
2
answers
297
views
Can I use random effects for variables other than time?
I have a dataset that contains information on purchases (in euros), salary, and other variables that reflect the purchasing preferences of each subject. The measures are repeated over time for each ...
1
vote
0
answers
88
views
Why are the confidence intervals for predictions from a binomial model different from the confidence intervals for predictions from a hurdle model?
I used the R package glmmTMB to analyze a dataset using a binomial model and a hurdle model, then used the package ggeffects to generate predictions from both models.
In glmmTMB, binomial models ...
2
votes
0
answers
137
views
Prediction for glmm (correcting for bias due to jensens inequality?)
I am trying to decide on the best method for producing model predictions (for graphing) from my generalized linear mixed effects model. I am interested in getting marginal predictions (i.e., what the ...
2
votes
1
answer
97
views
Deciding between the appropriate distribution for GLMMs -- Gamma vs. Beta
I am working on some modeling for relative abundance data. A previous iteration of this study was modeling species density and used GLMMs fit to a Gamma distribution with a log link. There's one main ...
8
votes
1
answer
225
views
Linear mixed model or Generalized linear mixed model
I have a dataset with repeated measures, different individuals each have six appointments in total. The outcome variable is continuous. I want to know if I should use a GLMM or a LMM to see what the ...
6
votes
1
answer
212
views
How should I interpret the dispersion parameter in my glmmTMB lognormal GLMM?
I have run a lognormal GLMM using the glmmTMB package, and I could use some help understanding the dispersion parameter. It is very large (2210), but there are no model convergence issues and no ...
6
votes
1
answer
239
views
I need help with mixed effect model
I'm analysing the effect of various factors on the volumetric measurements of the human brain. Fixed effects are: Gender, hemisphere, age and region. Persons ID is a random effect. At start I've tried ...
0
votes
1
answer
50
views
Theoretical question around Implicit Attitude Test data between timepoints: single vs. multiple datapoints per person?
I have a question that relates to the use of IAT scores across timepoints. As part of a large health-based intervention my colleagues and I have obtained IAT scores at different timepoints, from which ...
0
votes
0
answers
33
views
Is this a reasonable usecase of a GLMM for time series data?
I'm analysing some occupancy data over a long time period, where there is a year that an invasive species was introduced, and I expect it to affect the trend for my organisms' presence. I would like ...
2
votes
1
answer
79
views
How to simplify a singular GLMM that seems to need the random effect thats causing the problem?
Study design: each subject chose between two feeders with different sweetness, the difference between the sweetness was the 'condition'. There was four levels of condition, and ten subjects per level. ...
1
vote
1
answer
108
views
Should I transform my predictors in logistic regression?
I'm currently working on a logistic regression, but I'm unsure whether I should log-transform my predictors. Here is the formula for my model:
...
0
votes
1
answer
76
views
How to model feeder choice in bees while ignoring unbalanced feeding events per bout?
I'm analyzing an experiment I ran with bumblebees, and really struggling with choosing the appropriate model.
In the experiment, each bee made feeder choices across two temperature conditions:
...
6
votes
1
answer
149
views
Running an analysis of pre-post cluster RCT using a GLMM. Why does LMER include cases with only post data, but not cases with only baseline data?
I am running an analysis of a pre-post cluster RCT in a GLMM framework. Why does LMER include cases with only post data, but not the cases with only baseline data? Is there a way I can make it use the ...
1
vote
1
answer
178
views
How can you fix a GLMM with large z-statistics?
I am using glmmTMB and keep getting this diagnosis on my model when I check it:
...
2
votes
0
answers
168
views
GLMM interpretation and DHARMa quantile deviations detected
I could really use some help interpreting my GLMM and its diagnostics. This is my first time posting so let me know if you would like further clarification on anything!
I'm trying to build a model for ...
4
votes
1
answer
115
views
Discrepancy in point estimate and standard error of random effect variance component between Bayesian and frequentist GLMMs
I am investigating the properties of a GLMM with Beta response distribution and a hurdle component to model the probability of observing a zero. I have fit a frequentist version of the model using the ...
0
votes
0
answers
68
views
Type of regression distribution for proportional time data
I am trying to understand differences in the time spent on two sides of a Y-maze between treatments. The response variable is the proportion of time spent on one side of the maze [0,1] (see below). I ...
2
votes
1
answer
103
views
Significant underdispersion in DHARMa but not performance
I am using DHARMa to check dispersion in my glmm Poisson model and have uncovered significant UNDER-dispersion. Is this something I need to address ? I know significant overdispersion can cause issues ...
4
votes
1
answer
100
views
Proper setup for a GLMM evaluating kin preference in a mate choice experiment
I conducted a mate choice experiment where, in n=31 trials, individual males could choose between 2 females, one being kin the other non-kin. The binary outcome was 1=chosen or 0=not chosen for each ...
0
votes
0
answers
31
views
Adding PCA scores to mixed model in R?
So I've done two separate tests, a PCA and a GLMM, using the same groups of individuals. The experiments have to do with animal behavior, so I did preliminary recordings of how the animals interact ...
4
votes
1
answer
321
views
Visualizing glmm predictions: confidence intervals from ggpredict
I'd like to create a graph for my paper that visualizes my binomial glmm, ideally with confidence intervals. However, my CIs using ggpredict came out a bit funky.
Here is some example code using the ...
5
votes
1
answer
236
views
Meta analysis for one-sample proportion with 0 events in some studies?
I am doing meta analysis for a one-sample proportion where some of the studies have 0 events. My understanding of the statistical literature is that:
Traditional meta analysis methods that require a ...
5
votes
1
answer
140
views
Can I cluster data based on their location and use it to account for spatial autocorrelation in my GLMM model?
I am trying to understand species presence (1/0) within protected areas in Africa using a set of predictor variables. My data is not nested and contains no hierarchies within it.
My question pertains ...
0
votes
0
answers
56
views
Best practices for testing fixed effects in GLMM?
When testing fixed effects in linear mixed effect models, Luke 2017 shows the following:
Traditional likelihood ratio test (LRT) and Wald tests can be anticonservative (inflated type 1 error rate) in ...
3
votes
1
answer
95
views
Retaining fixed effects during buildglmmTMB
I am using buildglmmTMB to build a model for several different taxa. I have 700 ish taxa and ~10 effects. I have a script that loops through all the taxa and ...
2
votes
1
answer
104
views
GLMM of sparse microbial data with a high number of observations shows some deviation in DHARMa plots?
I'm currently analyzing a microbial sequencing dataset (>10 000 of species) of ~40 000 samples/observations. Out of these 1000's of species I want to select single species and see if one of the <...
0
votes
0
answers
28
views
Why does centering and scaling change my model (binomial response glmm) coefficients' p-values, but just scaling doesn't? [duplicate]
I have a glmm in R with 4 fixed effects, 4 interaction effects, 2 random effects, and a binomial response variable. I have two versions of this model, both with the same model strucure:
...
5
votes
1
answer
305
views
Determining best mixed effects model for the prediction of ordinal data, from a continuous non-normally distributed variable
How do I choose a good model for this analysis? I'm going to describe the scenario below, and outline several options I have brainstormed.
First, the scenario:
I have data from 50 technicians that ...
2
votes
1
answer
233
views
Beta-binomial vs binomial GLMM for modeling longitudinal 0–30 day substance use outcomes: DHARMa, dispersion, zero-inflation, prediction issues
Context : I’m working with a longitudinal cohort of patients followed for substance use disorders (n ≈ 3300 observations, 900 subjects). The outcome is the number of days of substance use over the ...
0
votes
0
answers
36
views
How do I find the variance explained by a fixed effect in a MCMCglmm threshold model?
I have run a threshold model using MCMCglmm (binary response variable) and obtained the proportion of variance explained by the random effects, but how do I do this for my fixed effect?
2
votes
0
answers
61
views
Three-way interaction regression model works but simpler versions do not converge - why?
I am analysing the effect of three predictive variables and one random effect on a response variable, using a dataset with 204 rows of data. See variable description below:
Response: measures for how ...
2
votes
1
answer
511
views
Testing the significance of fixed effects in GLMM: Type III Wald Chi-square test vs LRT
I'm wondering the best approach to test the significance of fixed effects in GLMM in R (with a logistic linking function; binary outcome, 2 fixed effects, 1 random effect).
My high-level aim is to ...
6
votes
1
answer
195
views
GLMM - Random Effects Not Normally Distributed
Update:
Based on the responses and comments, I don't think I should use the GLMM because my patient ID (random effect) perfectly predicts treatment outcomes. Defining treatment outcome as a predictor ...
0
votes
0
answers
38
views
What is happening when I model the sigma term in a glmm with a Gaussian distribution in brms
If I am interested in understanding the effect of an interaction between treatment and covariates on the variance of my response, as well as how they may affect the mean of my response, can I write a ...
2
votes
1
answer
102
views
GLMM for Unbalanced Data – Do I Need Pre-Weighted Data?
I’m using a GLMM for my sleep study because it handles missing data and different observation lengths well. My data is unbalanced since this was a field study, not a controlled lab setting.
Shift ...
1
vote
1
answer
123
views
How to calculate a 95% CI on negative-binomial marginal coefficients? Strange results with GLMMadaptive::confint and GLMMadaptive::marginal_coef
I'm fitting a negative-binomial model for count data in a repeated measures setting
...
0
votes
0
answers
80
views
Interpretation of Residual vs Predicted in beta GLMM (glmmTMB) with Dharma
Hi,
I have run a beta GLMMTMB in which my response variable ranges between 0-1 so I have used beta distribution. In my model I've got 3 continuous (numeric) predictors and 3 random effects factors, ...