Skip to main content

Questions tagged [lme4-nlme]

lme4 and nlme are R packages used for fitting linear, generalized linear and nonlinear mixed effects models. For general questions about mixed models use [mixed-model] tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
39 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 ...
Paul Julian's user avatar
0 votes
0 answers
6 views

block bootstrap implementation for `gls` from `nlme`

I have several datasets of timeseries data (days) with an experimental intervention on some days, where some of the datasets cover multiple sites. I also have matching day-level and site-level ...
A. Donda's user avatar
  • 3,210
0 votes
0 answers
37 views

Advice on mixed effect model formula for R's lme4

I'm new to mixed effects modeling and definitely lme4 and would greatly appreciate some advice. My research question: what factors determine a business' number of online reviews per day? The data is ...
LearningScholar's user avatar
0 votes
1 answer
47 views

lmer - how to report results and group differences? [closed]

I want to test the effect of my treatment drug on different populations. I have 3 groups, tested at 3 time points, and one dependent variable. My data: ...
CAA's user avatar
  • 1
1 vote
0 answers
35 views

Issue with bootstrap confidence and prediction intervals of mixed effects model predictions [migrated]

Recently I have asked a question on how to generate meaningful bootstrap confidence and prediction intervals for mixed effect models predictions in R using bootMer ...
Marco's user avatar
  • 43
1 vote
1 answer
56 views

Why do dynamic panel data models with random effects yield different effects depending on the R package (plm vs lme4)?

[Edited for clarity and detail] Summary: A random effects model should produced biased estimates for a dynamic panel, but the lmer function of the R lme4 package ...
Hernan's user avatar
  • 249
0 votes
0 answers
45 views

Steps to conduct a linear mixed model and post-hoc comparison test

I would like to ask for your help with the best way to analyze the following experiment within R. Here is my design: there are 15 treatments, in four blocks. For each treatment, in each block, we have ...
Caio Mattos Pereira's user avatar
1 vote
0 answers
30 views

Degrees of Freedom in Emmeans

I am using the 'emmeans' package in R to compute estimated marginal means for my (liner mixed-effects) model. However, I am enountering a warning message related to the number of observations ...
babygould's user avatar
1 vote
1 answer
35 views

Linear models to compare SNP categories between patients

I have 8 patients (GROUP: 3 healthy, 5 disease). For each patient, I determined single nucleotide polymorphisms (SNPs) and annotated the effect of the SNPs (EFFECT_CATEGORY). Each SNP (~3000 per ...
BackFish's user avatar
1 vote
1 answer
28 views

Testing the effect of a continious IV on DV, in order to explain group differences

I would like to ask a question regarding an analysis I’m planning and it might be a basic question so, apologies in advane.... To describe the situation: There are two groups of participants in my ...
gfndngo's user avatar
  • 31
0 votes
0 answers
12 views

Is it possible to reuse predictor fixed parameters in a nonlinear mixed effects model fit across mulitple nonlinear response parameters using nlme?

I have data where I want to fit a model given that I know the value at time zero of one stage is equal to the asymptotic value of the previous stage. In particular, I have kinetic growth curves ...
wdkrnls's user avatar
  • 297
2 votes
1 answer
211 views

lme4 Inconsistency

We aim to model how reaction times (RT) differ between groups in a fully between-subjects design. We also expect item difficulty to affect responses, and to interact with group. Each subject (n=120) ...
James Scott's user avatar
1 vote
1 answer
25 views

Model comparison or beta coefficient of full model?

my question is a rather theoretical one. I have to decide in advance how I want to analyze my data (I'm going with the lme4 package in R) and feel torn between doing a model comparison by creating two ...
Sahila's user avatar
  • 25
1 vote
1 answer
64 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 ...
DeMelkbroer's user avatar
1 vote
0 answers
25 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 ...
fair21comic's user avatar
3 votes
1 answer
53 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 ...
Marco's user avatar
  • 43
7 votes
1 answer
160 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) ...
Hazel's user avatar
  • 71
1 vote
1 answer
41 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 ...
Mikeed's user avatar
  • 11
1 vote
0 answers
28 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~...
Graciliano Santos's user avatar
1 vote
0 answers
63 views

Calculate inter-rater noise using Kahnemans (2021) approach

I need help calculating signal and noise based on the method described by Kahneman et al. (2021) in their book "Noise." They provide a technique for quantifying noise between raters ...
Magnus Nordmo's user avatar
5 votes
1 answer
82 views

Regression Modelling using lme4 in R

I have GPS collar data on a species of desert gazelle throughout different seasons and want to model the effect of seasonal changes in weather patterns on their movement patterns (e.g. daily distance ...
rhyncogale's user avatar
1 vote
0 answers
45 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 ...
KayAnn's user avatar
  • 11
0 votes
1 answer
35 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 ...
OJ432's user avatar
  • 1
2 votes
1 answer
29 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 ...
rose r's user avatar
  • 21
1 vote
1 answer
33 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 ...
abeeisnotabug's user avatar
4 votes
0 answers
51 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. ...
Erkin's user avatar
  • 41
5 votes
2 answers
251 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 ...
Pashtun's user avatar
  • 185
2 votes
1 answer
42 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 ...
user229's user avatar
  • 21
2 votes
1 answer
49 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 ...
DavidS's user avatar
  • 21
0 votes
1 answer
80 views

glmer significant and post-hoc test not significant

I ran a glmer model to test the effects of treatment on my response variable ...
GiorgioS's user avatar
0 votes
0 answers
22 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 ...
s.stats's user avatar
  • 477
1 vote
1 answer
124 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 ...
CrazyBirdLady's user avatar
0 votes
0 answers
32 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 ...
GiorgioS's user avatar
3 votes
1 answer
125 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^...
user1205901 - Слава Україні's user avatar
1 vote
1 answer
44 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: ...
user412894's user avatar
0 votes
0 answers
20 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....
a.henrietty's user avatar
2 votes
1 answer
64 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 ...
Johanne's user avatar
  • 31
0 votes
0 answers
18 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 ...
Patrick's user avatar
  • 227
1 vote
0 answers
15 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 ...
Gaby's user avatar
  • 11
1 vote
1 answer
66 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. ...
Pratorum's user avatar
1 vote
0 answers
66 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-...
Jackson's user avatar
  • 11
1 vote
2 answers
101 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 ...
AnnaBosshard's user avatar
1 vote
1 answer
46 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, ...
user avatar
0 votes
0 answers
38 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 "...
Patrick's user avatar
  • 227
1 vote
2 answers
92 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 ...
Suhas Bharadwaj's user avatar
0 votes
0 answers
17 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 ...
Leonie's user avatar
  • 1
3 votes
1 answer
25 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 ...
Jongjay70's user avatar
0 votes
0 answers
34 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 ...
Jongjay70's user avatar
0 votes
1 answer
27 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:...
jerlich's user avatar
  • 239
0 votes
0 answers
26 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 ...
Anshika's user avatar

1
2 3 4 5
70