Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
1 answer
132 views

Validating Model Setup for Differential Abundance Analysis Using ANCOM-BC in R

I am conducting an analysis on microbiota data from a study involving 55 women, categorized by pregnancy status and BMI (lean vs. obese). The goal is to explore the differential abundance of ...
4 votes
1 answer
170 views

Bootstrap confidence and prediction intervals of mixed effect model predictions

Let's say I fitted a mixed effect model mem with the lme4 R library, and I would like to use the ...
1 vote
0 answers
82 views

Extracting (true) marginal effects from nonlinear mixed effects models [closed]

I am modelling a binary data set using what I believe should be termed a nonlinear mixed effects model logit(pi) = mu + beta*x + U_1 + U_2 + U_3 where ...
1 vote
1 answer
84 views

Describing data structure and specifying a linear mixed model in nlme with nested and crossed effects

I am trying to specify a linear mixed model to analyse data with the following structure and have several questions about correctly describing the structure of the data and how to specify the model. ...
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) ...
1 vote
1 answer
63 views

LME4 model producing strange p values

When modelling QPCR data using LME4 I am getting a result that tells me my treatment effect is insignificant. When I plot the data this looks wrong and if I use JMPpro the p value for Treatment is ...
1 vote
0 answers
34 views

Distribution of the model vs. Distribution of the Residuals

Let's say I'm going to do an analysis where my response variable has a gamma distribution. I perform the analysis pointing to the distribution in my model (eg. using the lme4 package, m1<-glmer(Y~...
2 votes
1 answer
99 views

Why is it recommended to keep use.u=T (in bootMer) when doing parametric bootstrap for lmer models?

I am performing a parametric bootstrap with the intention of using the simulated values to create confidence intervals for my coefficients in a mixed model. I saw that it was generally recommended to ...
1 vote
0 answers
81 views

Moderation in linear mixed model

I ran a Linear Mixed Model in R with 2 centered predictors and a Group variable. fit1a <- lmer(DV ~ Predictor1*Group + Predictor2*Group + (1|...), data) One of ...
10 votes
1 answer
3k views

Interpretation of crossed random effect interactions in lme4

I'm considering a model in lme4 in which I am estimating random effects for two crossed factors, very similar to the Machines example in Bates' 2010 draft book (http://lme4.r-forge.r-project.org/lMMwR/...
0 votes
0 answers
37 views

Post-hoc tests for a Generalized Linear Mixed Effects Model

This question is linked to this one. I wanted to know whether the application of a treatment would have a significant effect on the proportion between healthy leaves and infected leaves. I have the ...
0 votes
1 answer
44 views

Multi-level Linear Mixed Model: Sampling and Power Issues

I am struggling to find a proper model for my analysis, and on top of this, I have some questions about the number of observations and the resulting power of the model. Experiment I ran a reaction ...
2 votes
1 answer
47 views

In a mixed model with intersubject and intrasubject variable what random effects should i put?

My master's thesis director wants to use a linear mixed model to analyze my data. My experiment has a task where participants click on a touch when a stimuli (a word) appears on screen. The dependent ...
1 vote
1 answer
41 views

Equivalence of Fixed Effects in Contextual Models with and without Random Slopes

When estimating "contextual models" (i.e., models that contain level-1 predictors as well as their cluster means on level-2), the estimation of the fixed effects should be unaffected by the ...
4 votes
0 answers
62 views

How to fit and perform diagnostics for (Linear) Mixed Effects Models on Rating data in R

I conducted an experiment where 143 test subjects (Interview) rated sets of 20 Stimuli (Stimulus) on a scale from 0 to 100. ...
5 votes
2 answers
277 views

Clarification on Random Effects Structure in Linear Mixed Models in R

I am using linear mixed models to analyze a dataset with a hierarchical structure, where measurements over time (level 1) are clustered within individuals (level 2), and individuals are clustered ...
2 votes
1 answer
60 views

How to Implement a Mixed Effect Model for Nested Data in R? [closed]

Data sample below. I'm working on an analysis involving a complex nested dataset and I need to implement a mixed effect model in R. Here's a brief overview of my situation: Objective: Determine the ...
1 vote
1 answer
244 views

Best model for data with categorical variables lmer

I have some data composed of a continuous dependent variable in minutes and several categorical independent variables. I fitted this model but was advised on Stack Overflow that my model might not be ...
0 votes
1 answer
127 views

glmer significant and post-hoc test not significant

I ran a glmer model to test the effects of treatment on my response variable ...
0 votes
0 answers
40 views

ICC for repeated measures across time with clustering by eye

I am trying to assess the ICC across measures at 2 time points (baseline and 2 months) on participant eyes, so each row represents an eye and some participants have two eyes included in the study. I ...
2 votes
1 answer
133 views

Why estimated population variance differs from estimated $\sigma^2 + \tau^2$ in this random effects ANOVA?

A random effects ANOVA model is typically written as $Y_{ij} = \gamma_{00} + u_{0j} + \epsilon_{ij}$ . and the total variance of the outcome variable is decomposed into $var(Y_{ij}) = \tau^2 + \sigma^...
1 vote
1 answer
88 views

Non-normally distributed residuals and linear mixed-effects models [closed]

I am working with a rather small dataset (cca 150 DPs coming from 10 participants) and trying to model fixation duration as a function of two independent variables: 1 with two levels (deviation-coded: ...
0 votes
0 answers
23 views

Cut-off based on an ordinal variable in unbalanced panel data

I am currently looking for an appropriate statistical analysis for my research questions. I have a continuous variable (score) and an ordinal variable (test). Score is quadratically related to Test, i....
50 votes
2 answers
78k views

Mixed Effects Model with Nesting

I have data collected from an experiment organized as follows: Two sites, each with 30 trees. 15 are treated, 15 are control at each site. From each tree, we sample three pieces of the stem, and ...
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 ...
0 votes
0 answers
27 views

Flexible covariance structure of the nested term in linear mixed model

Linear mixed model with one grouping factor nested in the other is commonly specified as mod1 below, using the Oats data from ...
0 votes
1 answer
98 views

Avoid singular fits in mixed models in R with blme - checking layman's priors

While fitting linear mixed models, I would like to avoid zero random-effects (ranef(model)) and cluster-level SD estimates (...
1 vote
0 answers
69 views

Bread freshness in bread basket, Multi-Level Analysis in R; 2 time points [closed]

This is my first attempt with multi-level analysis. My research question is; How does the freshness of different types of bread (6 level) within a bread basket, change over two time points (ranging 4-...
3 votes
1 answer
43 views

How to analyze time varying covariate random effect

I am running a multilevel growth curve model to examine predictors of social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a continuous numeric variable. The age variable (Index1) has ...
12 votes
2 answers
34k views

How to perform post-hoc comparison on interaction term with mixed-effects model?

I’m working on a data set in order to evaluate the impact of drying on sediment microbial activities. The objective is to determine if the impact of drying varies among sediment types and/or depth ...
1 vote
2 answers
120 views

How to model a controlled experiment (three time points, two groups) in lme4?

We conducted a behavior change field experiment using the following variables: Three time points (T0, T1, T2) Two groups (intervention vs. control) Individual ID Workshop ID The intervention was ...
1 vote
0 answers
16 views

Is it possible to control for autocorrelation within individuals and families using GLS corCAR1?

I have a sample of twins with repeated measures of BMI. I want to determine whether intake of a nutrient is associated with BMI trajectories. I have been using GLS in the ...
0 votes
1 answer
358 views

Get non-negative parameter estimates for linear mixed models in R

I need to create a linear mixed model in R but parameter estimates have to be non negative. (beta1 and beta2 and beta3 > 0)The model is: VOLUME SALES = beta1 * morning + beta2 * afternoon + beta3 * ...
1 vote
1 answer
81 views

How do I resolve singularity issues related to my random effect term in LMM

I am trying to run a linear mixed model (LMM) to observe how CH4 and CO2 fluxes change over time. I have a randomized block design with repeated measures over time. I also have an unequal sample size, ...
9 votes
2 answers
7k views

Within-subject covariance estimation in a small sample

My sample has four subjects whose response variable is each measured four times. I assume the measurements within each subject is normally distributed $\mathcal{N}_4(\mu,\Sigma)$. Is there any good ...
0 votes
0 answers
39 views

Understanding (0 + Days | Subject) in lme4

The vignette "Translating lme4 models to sommer" of the sommer package explains fm1 <- lmer(Reaction ~ Days + (0 + Days | Subject), data=DT) as "...
2 votes
2 answers
155 views

In mixed-effects model, can a variable be both a grouping factor in a random intercept and a fixed effect?

I've come across several discussions on mixed-effects models, yet none seem to address my specific query. From what I've gathered, it appears that the model specification below is correct, allowing a ...
0 votes
1 answer
31 views

Advice on writing complex mixed-effect model for a neuroscience experiment

We have done an experiment using optogenetics (a technique to manipulate genetically engineered neurons with light) and are trying to write the proper mixed-effects model. The experiment is as follows:...
1 vote
1 answer
695 views

glmer model convergence question

We are working with a longitudinal dataset, with three variables: WAIP, BPSRRI and group. WAIP and BPSRRI are measured repeatedly for 10 times and group refers to the group assignment of our subjects ...
0 votes
0 answers
33 views

Why does lmer show coefficents for both levels of factor variable for first fixed effect?

I am trying to fit a linear mixed model to my data in R using lme4, but I'm new to lmer / mixed models in general and have trouble with the output. There are two issues: two-level factor variable has ...
5 votes
1 answer
53 views

Is repeated measures appropriate for testing for a difference in repeated paired group measurements?

I'm new to repeated measures and am trying to understand how it maps to lmer. I have measurements from two time periods: $t_1, t_2$. At each measurement period, the same 50 different foods are scored ...
0 votes
0 answers
38 views

Error less observations than random effects in lmer with time varying covariate

I am running a multilevel growth curve model to examine predictors of social anhedonia (SA) trajectory through ages 12, 15 and 18. SA is a continuous numeric variable. The age variable (Index1) has ...
0 votes
1 answer
51 views

Post-hoc for GLMM with polynomials/splines

I'm trying to do a post-hoc on my GLMM but I'm not sure I'm doing it right. I test the effect of continuous variables X and Y on a binary response Z with my IDs as a random effect with this code: <...
2 votes
1 answer
111 views

Interpretation of generalized linear mixed-effects models: How should I proceed with a significant interaction term?

My experiment has the following factors: "year" (fixed) with levels "1" and "2" "age" (fixed) with levels "old" and "new" "treatment&...
16 votes
1 answer
13k views

Is this an acceptable way to analyse mixed effect models with lme4 in R?

I have an unbalanced repeated measures data set to analyse, and I've read that the way most statistical packages handle this with ANOVA (i.e. type III sum of squares) is wrong. Therefore, I would like ...
0 votes
0 answers
41 views

Model failed to converge using glmer

My dependent variable is actigtraph measurements measured every minute for 55 individuals (count data- right skewed, most values at 0). I have around 1.2m rows. Here is my simple random intercept ...
1 vote
1 answer
36 views

Different time trends of groups: quadratic vs. linear decline

Suppose we have two groups of individuals A and B that we observe over time on a parameter, say blood pressure. We want to compare the group effect over time in a GLMM using ...
1 vote
2 answers
74 views

Mixed model: Which parameters to provide for sample size calculations?

I am currently planning an analysis in a relatively new area of research and would like to provide data that will allow for future power analyses. Unfortunately, I am completely lost in the ...
1 vote
1 answer
55 views

Understanding lme4 output: Unexpected different results [closed]

I am teaching myself how to do multi-level models (MLMs) in R. I have two models, which I think should give me the same information (with some omissions in M2), but they are not completely the same. I ...
7 votes
3 answers
409 views

AIC model selection is keeping a variable with p = 0.47

I am modeling migration departure timing for swallows to try and figure out which of the predictor variables that I have data for influenced departure timing. All of the predictors are variables that ...

1 2 3
4
5
71