All Questions
297 questions
3
votes
2
answers
108
views
R: How to fit a linear mixed model with a custom covariance structure for two random intercepts
Suppose I have a dataset with repeated measurements on q clusters. I want to fit an LMM with two random intercepts, on the same cluster, with a non-diagonal covariance structure on the random effects (...
4
votes
0
answers
73
views
Major discordance between uncertainties estimated by `predictInterval()` and `bootMer()` for binomial GLMM with cloglog link
We have been using predictInterval() from the merTools package to bootstrap uncertainty for binomial GLMM models (complementary ...
7
votes
1
answer
135
views
Using proportions as a measure of nest success in a glmm
I want to run a GLMM to see if a conservation intervention had an effect on the nesting success of a shore-breeding bird. I'm comparing this against a control where no intervention was used. I used ...
3
votes
2
answers
88
views
Using Zero inflated GlMM when you have too many zeros
I am trying to understand the influence of several predictors (n=8) on the presence or absence of a species using generalized linear mixed models. Unfortunately, I do not have great data. I have 13000 ...
3
votes
2
answers
124
views
Mixed effects models with only categorical data?
This is my first time trying to run any type of mixed effects models. I have a dataset where I was instructed to use some form of mixed effect modeling (lme4 package) to see if functional traits of my ...
1
vote
0
answers
24
views
Characterize interaction effect from binomial glm
I have made a binomial glm which describes how a complexity score (integer value 0-5) and an experimental treatment (factors A,B,C) affect a ratio of successes to failures (x, y) (both x and y are ...
2
votes
2
answers
276
views
Mixed Effects models approach?
I've been debating on a more deliberate diving into working with mixed models but I am slowly feeling overwhelmed. I've been going through resources (tutorials, webpages, books, etc) and have feeling ...
7
votes
1
answer
263
views
General Linear Mixed Model: How do I fix 'Rescale variables? Model is nearly unidentifiable' error on glmer
I'm trying to fit a generalized linear mixed model (GLMM), but I'm getting a persistent error. I'm looking at the relationship between weather (continuous variables: rainfall, maxtemp, and mintemp) ...
2
votes
1
answer
298
views
Confidence interval for GLMM
I am conducting a GLMM for my bachelors thesis and I am wondering, how I can calculate and whether it is common to report confidence intervals for the models' estimates.
This is the model I fitted on ...
2
votes
0
answers
33
views
How to fit a GLMM with multiple levels of nesting
I have some data I am struggling to process at the moment. I have landed on using generalized linear mixed models (GLMMs), but I am having a very hard time wrapping my head around it.
I have a large ...
1
vote
2
answers
288
views
Model selection for glmer in R
I am trying to make a model for the different amount of species caught in different traps in 3 different locations on 3 height levels, along with 3 transects per location (resulting in 9 traps per ...
0
votes
1
answer
44
views
GLMM with negative binomial- narrowing down variables & choosing a model
I'll start by saying apologies for perhaps not wording things correctly, as stats is not my first language (lol). Please let me know if there is any other info I need to provide to make this easier to ...
1
vote
0
answers
28
views
Choosing different random effects structures for mixed-effects models with multiple response variables in R
I'm working on a project where I have two response variables of animal behaviour: one is count data (Poisson distribution), and the other is proportion data (Binomial distribution). I constructed GLMM ...
0
votes
1
answer
42
views
glmer problems in seeing all variables
I am trying to run a binomial glmm to understand the relationship between various concentrations of a compound sensed by different castes of ants. We have 5 different compound concentrations (a-e), ...
3
votes
1
answer
105
views
Added more data and suddenly GLMM fails to converge (R)
I have a dataset where I randomly sampled housing developments, and then within these I systematically sampled every habitat patch. I now have a dataset where each observation is a patch_ID, and I ...
0
votes
1
answer
2k
views
Error: PIRLS loop resulted in NaN value in GLMM (glmer) model with Gamma distribution
I have a problem fitting a GLMM model with a Gamma distribution (my outcome variable is strictly positive and right-skewed) and an identity link using glmer in R. ...
3
votes
1
answer
171
views
Solutions to a 'singular fit' in generalized linear mixed-effects models
What are common causes of a 'singular fit' in generalized linear mixed-effects models (GLMMs), especially when including random intercepts for grouping variables?
When using the ...
0
votes
1
answer
179
views
Linear Mixed Models: Testing the significance of a random factor using ranova() on the ouput of lmer() in R
We have a dataset with a response (dependent) numeric variable called "CTIR", a fixed (non-random) independent/explanatory numeric variable called "Temperature" and a random factor ...
2
votes
1
answer
74
views
How to account for yearly variation in data both between and within individuals in R (lme4)?
I'll try to make this as brief as possible. I am working with binomial attendance data (0 = absent, 1 = present) for seabirds at a breeding colony. There are ~300 birds that contribute ~60 days of ...
7
votes
2
answers
154
views
How can I get a best model? An exploratory LMM
I'd like to inquire about the linear mixed model and its application to my dataset. The dataset comprises a dependent variable (DV) denoted as V, alongside three ...
3
votes
1
answer
75
views
When should grouping variables interact in a mixed-effects model?
I was reading this post which is relevant to a research project I'm working on now. I think that I understand the difference between crossed and nested random effects, e.g. as described here.
The ...
5
votes
2
answers
107
views
Repeated measures within participant
I'm trying to learn linear mixed effects models and how to estimate them using the R package lme4 and I am confused about some aspects.
I have a dataset where a ...
1
vote
1
answer
169
views
Modeling or data error causing large standard errors in GLMM (lme4) with repeated measures
The aim:
I am trying to investigate the difference of COPD incidence in participants in stratified age groups of alcohol consumption debut.
The dataset:
I have a dataset of approx 4700 participants ...
3
votes
1
answer
72
views
What to do when the residuals of a general LMM are non normal and a generlized LMM will not build, when is it just too non-normal?
I've been having no luck building a general LMM. The residuals are not normally distributed, they follow somewhat of a leptokurtic distribution and homoskedacity is also present. Using log ...
7
votes
2
answers
166
views
How can I use a variable as a covariate which exists only for specific range for some clusters/groups?
I want to know how to use Poisson GLMMs when we have unequal samples available for different groups/clusters/participants in data.
Imagine a study where each of the 60 participants are given 1000 ...
3
votes
1
answer
102
views
Summary output of binomial GLMM shows significant effects, but graph shows overlapping CI error bars?
I have run this binomial GLMM:
...
3
votes
1
answer
64
views
Model diagnosis in GLMM model of binary outcome variable
I am trying to do a research article on morbidity, which is categorical, i.e., yes or no. I also consider fixed and random effects, given that all of the fixed effect covariates are categorical. Here ...
1
vote
0
answers
124
views
Overdispersion in GLMM with binomial distribution
I am getting acquainted with statistics and R and got stuck with my model. I am hoping someone could give me some insight on how to overcome overdispersion in generalized linear mixed models (GLMMs).
...
1
vote
1
answer
33
views
Determining the number of interactions between the independent variables
I am trying to use GLMMs models to analysis the morbidity status of child (yes or no) with mother’s demographic and environmental factors like
Wealth with factors ("Lower quartiles”,"...
1
vote
1
answer
90
views
How to specify a linear mixed model (LMM) for a repeated measures design with two categorical predictors and one continuous?
I would appreciate some help figuring whether a linear mixed model (LMM) is a good choice for my data.
My experiment is a 3 (neurostimulation target) X 2 (task block) repeated measures design that ...
2
votes
2
answers
442
views
Is it bad to have large random effect variance when fixed effect estimates are small?
I'm running a generalized linear mixed models (GLMM) and am comparing the Laplace approximation to the Gauss-Hermite Quadrature. I have three predictor variables (fixed effects) and each is a number ...
2
votes
0
answers
59
views
Faster version of lme4 for logistic regression 3-level multilevel model in R with 2 million data points
I'm running a 3-level multilevel model in R with binary outcomes and survival analysis with over 2 million data points. The lme4 package takes 12 hours to run one ...
1
vote
1
answer
4k
views
Reporting results from a GLMER
I have conducted a generalized linear mixed model (GLMM). For the output, see below. Normally (when reporting results from an ANOVA), I write something like this: $F(1, 116) = 6.09$, $p = .015$, $η2 = ...
1
vote
1
answer
100
views
Inverse and log function get opposite results in GLMM - which one to pick?
I am trying to fit GLMM in R where we predict reaction times (RTs, dependent variable) by a continuous, uniformly distributed variable called scores (independent variable); the random effect is the ...
0
votes
0
answers
442
views
glmer inverse Gaussian distribution and identity link, some models failed to converge
I'm relatively new to GLMM and am experiencing some difficulty with model convergence. Specifically, I have a data set from 200+ participants, each of whom completed 200 trials of a visual search task....
0
votes
0
answers
55
views
Can't find family using glmer in R
update
The question is that I have some datas, includes:
region/ animal id/ year/ gender/ environment's noise value/ environment's illumination value/ cort1
and I would like to know whether the data ...
2
votes
0
answers
122
views
How to fit GLMM or LMM models to analyze alpha diversity metrics (Hill numbers)?
I am studying alpha diversity (Hill numbers) using shotgun metagenomic data. The sampling design has multiple levels of nesting, as follows: 2 years > 3 locations > 2 conditions > 1 transect &...
3
votes
1
answer
180
views
How to estimate precision on a prediction for a GLMM for an unobserved level of a random effect
I am modelling values that are rates, strictly positive, using a Gamma GLM and or GLMM (here using glmer in lme4) to do so, with ...
1
vote
0
answers
28
views
Fit generalized linear mixed model (with lme4 or other) to cumulative data of a continuous variable
I have measurements of resin production of pine, which are taking tapping the tree, that is, making a physical wound and collecting the resin in a pot. When the pot is full we replace it with an empty ...
0
votes
0
answers
38
views
Combining two fixed factors in one factor
I have a question about a mixed model I'm running.
The formula is the following:
DV ~ Combined * Sex * Arousal + (1 + Combined | Subject) + (1 | Item)
My question ...
2
votes
1
answer
160
views
Model failing to converge with LMER
I want to predict the relationship between the number of groups a person belongs to and their overall well-being (totalwell). However, I would like to consider the possibility that a person could ...
2
votes
1
answer
589
views
Dispersion parameter in DHARMA
I have a question about the interpretation of residual diagnostics using DHARMa.
I fitted a binomial mixed model and used DHARMa for model diagnostics.
...
1
vote
0
answers
91
views
Zigzag residual plot
What is not right with a model that produces this kind of residual plot? Does it have to be discarded?
My data is egg production (counts, but cumulative) over a period of 55 days for 7 treatments+...
2
votes
1
answer
2k
views
How do I use the glmer function properly with my data in R
I have a set of around 23k rows of data. It is a set of animal movement lengths (dist), going from 0 to several thousand, with the majority being around 50 to 100. The data doesn't have a normal ...
0
votes
0
answers
50
views
GLMM: glmer error when setting interaction terms
I am having difficulty fitting a generalized linear mixed-effects model in R.
I did a simple study looking at the variables affecting the triggering of camera traps. My response variable is binary (...
0
votes
1
answer
259
views
Linear mixed effect model with years as random effect
I have to set up an LMM with just one independent variable and there is both monthly and yearly variation. I aim to get fixed effects coefficients (slope and intercept) for each month and year given ...
3
votes
1
answer
127
views
Converting lme4 syntax in lmm equation
I have computed a model with the lme4 package with the following syntax:
y ~ time*treatment*covariate + (1|subject)
The ...
0
votes
0
answers
52
views
Minor over-dispersion: reasonable to proceed with standard poisson GLMM?
I am using a Poisson GLMM with glmer() from lme4 package in R. My data is ecological count data, and the model has one random ...
2
votes
1
answer
122
views
Can I test the difference between subjects in a GLMM?
I have the following GLMM model (using R with the lme4 package):
resp ~ condition * level + (1 | subject)
I have a clear difference between levels and I would like ...
0
votes
1
answer
29
views
Is it appropriate to use GLMM for the dataset I have
I am interested in determining the influence of biotic (initial height) and abiotic (light, canopy, soil moisture content, soil nutrients, rainfall, and temperature) factors in the absolute height-...