All Questions
155 questions
3
votes
2
answers
110
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 ...
3
votes
2
answers
125
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
1
answer
299
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 ...
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 ...
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
170
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 ...
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:
...
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
91
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
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
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 ...
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
3k
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
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-...
2
votes
1
answer
172
views
Can I do multiple binomial tests seperately of each other?
in the experiment the subjects had to choose between answer A and answer B in 3 different settings. The question is, if there is a significant preference for answer A in any of the settings.
Can I ...
0
votes
1
answer
163
views
lme4 GLMM model failing to converge
This is the type of vague question that's likely to get downvoted, but here we go...
I am trying estimate a logistic panel regression to estimate the probability of experiencing a disease before and ...
1
vote
1
answer
121
views
lmertree: Partitioning factor with too many levels?
I am new to lmertrees. I am having trouble analyzing how individual stimuli in my data clusters together on the basis of how some participants answered to them in three different conditions. My code ...
0
votes
1
answer
859
views
Problem with finding good model fit using glmer()
I have a dataset of measurements of "Y" at different locations, and I am trying to determine how variable Y is influenced by variables A, B, and D. I also have another variable, C, that may ...
1
vote
1
answer
468
views
Effect size for fixed effect variable with >2 levels binomial glmm (lme4)
I have a mixed effects model with a binomial outcome which I constructed using glmer from the lme4 package in R. In the output ...
2
votes
1
answer
1k
views
Mixed effects logistic regression type model in R - GLMER problems
I'm doing a project where I have students listen to 7 stimuli (all students listen to the same 7), and then say for each one whether that stimuli sounds more like PALM or TRAP. There are two groups of ...
3
votes
1
answer
77
views
How to specify random effects in logisitc mixed effects regression with multiple observations per subject but only 1 outcome per ~50 DV measurements?
I have a dataframe that looks something like this:
Each subject got somewhere between 40-120 lesions in a given procedure, and I want to know which dependent variable was associated with "injury&...
2
votes
0
answers
350
views
GLMM model formulation with a partial "subcondition"
I am modeling reaction times in a GLMM using the lme4 package. My data have the following structure:
Subject ID
Reaction times (RT)
Distractor type (Type): (3 levels): moving - static - no distractor
...
1
vote
1
answer
3k
views
How to interpret the random effect of a random slope model?
I designed an experiment to observe the shading effect in the distribution of 2 species of crabs through time. So basically I have 4 levels of shading (no shade, 20%, 50%, and 80%) with 7 ID to each (...
0
votes
0
answers
84
views
What should i use lme or glm? (Biostatistics, diversity) [duplicate]
I am trying to work on the data of my master thesis. I have to create some model, but I am stuck due to my lack of knowledge in statistics (I am working on it). My data are 58 sample points each has ...
2
votes
0
answers
122
views
Random effects are not centered in mixed effects logistic regression model
Random effects are usualy modelled as normally distributed with zero mean. Thus I would expect that the mean of the estimated random intercepts is close to zero. However, in my example this mean is ...
2
votes
1
answer
188
views
Generalized Linear Mixed Model: Random slope inverts effect
I struggle with the analysis of my very skewed data with linear mixed models in R. Since the original data is for actual research, I can't share it with you, but I have created a fake dataset, that ...
3
votes
0
answers
3k
views
What distribution to use for left-skewed data in generalized linear mixed models (for use with structural equation modelling)?
I'm trying to run a GLMM with a response variable that is left-skewed. Eventually this model will form part of a piecewise structural equation model (using piecewiseSEM).
I have data from 480 plots, ...
7
votes
0
answers
3k
views
Meaning of the weight argument in glmer and lmer
I have been looking into how to use the weight argument of glmer/lmer to represent "frequency" weights. I was ...
2
votes
0
answers
535
views
glmer (lme4) vs meglm (Stata)
I'm trying to fit a binomial GLMM, but I'm ending up with very different results between lme4 and Stata.
In R, I'm running ...
2
votes
1
answer
1k
views
Generalised Linear Mixed Model Diagnostics using DHARMa
I am running a GLMM in R in lme4 package, the outcome variable is binary and the 10 fixed effects are a mix of categorical and continuous variables. The models have three random-effects.
I am using ...
6
votes
1
answer
2k
views
Interpretation of binomial GLM (glmer) with interaction and results description
I would like to confirm if I am analysing the results of my model correctly and get some advise if I am missing something!
I conducted the following model to analyse factors that describe the feeding ...
2
votes
2
answers
815
views
GLMM - binomial
I am rather new to R. I am trying to run a GLMM - binomial logit.
I have three independent variables (x1, x2, x3) and a dependent variable (...
1
vote
1
answer
736
views
Plot the probability (success) of a binary variable from coefficients of a GLMM?
I have developed a GLMM (Mixed Generalized Linear Model), as you can see in more detail [here] (Is it correct to evaluate differences of a binary variable between different places with a GLMM?)
...
0
votes
0
answers
45
views
Converting LMM to GLMM
I've fit my model using lme (in nlme, R). However, this is not normally distributed. Taking the log of the outcome variable ...
1
vote
1
answer
690
views
GLMM with ex-Gaussian distribution function (trial-level reaction time data)
I am trying to use GLMM in R to fit a mixed-effects model (three categorical predictors, one continuous predictor) to trial-level reaction times from a group of participants.
The reaction time ...
1
vote
0
answers
177
views
Doubts about the use of Cross-Validation in GLMM
I've recently ask in statckoverflow about some doubts with logistic regression fitted with a GLMM and an user recommend me asking in this forum. So, here it goes.
I work with a wild population of a ...
1
vote
0
answers
881
views
Gamma GLMER Error: PIRLS step-halvings failed to reduce deviance in pwrssUpdate
I am attempting to run a GLMER with a gamma function in R.
Here is my code:
...