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
6 views

Making inferences on BLUPs/conditional means from multilevel model

We're currently running a conjoint experiment in 26 countries with 2000 participants per country and would like to use a multilevel model. We've done up most of the pre analysis plan and run some ...
user avatar
  • 1
0 votes
0 answers
3 views

Replicating a study with a discrete dependent variable in linear mixed effects model (1-4 scores)

As the title says, I want to replicate a study that runs linear mixed effects models with a dependent variable that is discrete, with scores from 1 to 4. So, I have two main questions about that. 1 ) ...
user avatar
2 votes
0 answers
19 views

Type II vs. Type III using car::Anova on lmer model [duplicate]

I have fit a linear mixed-effects model using lmer. The model includes 1 categorical predictor variable, 2 continuous predictor variable, all interactions, and a categorical random effect. To test for ...
user avatar
1 vote
1 answer
21 views

Adding/removing covariates in lmer?

I am trying to add covariates in lmer, but I do have difficulty with figuring that that, can anyone help me out with this? I have this happy_plot = lmer(happy_score ~ life_quality +(1|subject), data) ...
user avatar
2 votes
0 answers
14 views

lme4: glmer() warning messages with count data mixed-effects model and how to proceed with model fit

I have fitted a GLMM with the function glmer of lme4 package. My data consists of a repeated measures count variable, which I am trying to explain with a continuous variable (week) and some ...
user avatar
  • 21
0 votes
0 answers
23 views

Statistical formula of likelihood in nlme

I understand that nlme package in r uses REML method for estimation. Where can I find the statistical expression of this likelihood (for a single level of grouping) ...
user avatar
0 votes
0 answers
12 views

How to run a multilevel regression model with crossed random effects: items and participants?

I am trying to run a multilevel regression for my study: I have two random effects; participants (97) and items (which are the 20 words used in the study) Each participant had to spell the same words. ...
user avatar
1 vote
1 answer
23 views

the simpler model does not converge and is singular

...
user avatar
  • 905
1 vote
1 answer
18 views

boundary (singular) fit due to many time points per ID

I'm getting the warning boundary (singular) fit: see ?isSingular with this dataset ...
user avatar
  • 905
0 votes
0 answers
25 views

lmer anova effect sizes

I would like to compute the marginal R squared for the whole factors from an anova table. This post shows how to get the effect size for each fixed effect based on the ...
user avatar
  • 639
0 votes
0 answers
14 views

modelling the multilevel data in R

I have a dataset of patients. each patient is measured 3 times in the morning, afternoon and evening and in batches of 10 per day. the data set looks like the below: ...
user avatar
  • 2,165
0 votes
0 answers
37 views

Can a mixed model random slope include a between-subjects factor in a repeated measures design?

I'm after some statistics help with generalised linear mixed models. I have built a model using glmer from the lmerTest package in R to fit my data with a gamma distribution. The formula is as follows:...
user avatar
0 votes
0 answers
30 views

Using a linear mixed model with only one observation per subject per condition

I'm running a LMER (in R) on some behavioural data where I have one observation per participant per condition. However, I'm unsure whether it is the appropriate analysis. The data is in the below ...
user avatar
0 votes
0 answers
14 views

Understanding interaction output for mixed model

Two group (healthy(1) and sick(2)) with RMSSD measurements at three timepoints (Base(1), Bet(2), First(3)). Question is whether the groups differ at each timepoint AND if they differ in their change ...
user avatar
1 vote
0 answers
17 views

LME Quantifying differences between and within intervention groups

I am new to mixed-effects models and trying to ensure I understand them appropriately. I am analysing the results of a 2x2 cross-over intervention study. Essentially, I have 50 subjects who completed ...
user avatar
  • 11
0 votes
1 answer
27 views

How to select predictor variables for linear mixed model?

I have a linear mixed model with ~30 clinical/treatment variables and repeated outcome variables for patients. E.g. The outcome variable is Breast symptom scores, which were collected at different ...
user avatar
1 vote
0 answers
18 views

glm() vs. glmer() on repeated measures

Say I am curious about whether the relationship between class rank (rank) and passing a final test (pass) is dependent upon days until summer vacation (days until summer). In my dataset, I have Mary, ...
user avatar
  • 131
0 votes
0 answers
53 views

Can adding a Level 2 predictor impact the Level 1 variance?

Heck et al (2013) p.137 write: [O]ne approach often used is to examine the change in residual variance that occurs by adding predictors within a sequence of models. The analyst begins with the ...
user avatar
0 votes
0 answers
19 views

How to interpret the fixed effects in relation to random effects in mixed effects model?

This is a small subset of my data to show what it looks like because my data set is too large: I want to compare the long-term effect of two types of surgery on weight loss. In my real data set ...
user avatar
4 votes
1 answer
96 views

Linear mixed effects modeling with MZ and DZ twin pairs

I have a question on how to deal with following experimental setup. I have data on microbiome and metabolomics for twins that are either MZ or DZ, and thus we have only pairs in the dataset. I ...
user avatar
  • 45
0 votes
0 answers
21 views

Unconditional Multilevel model for repeated measures data using lme4 in R

I have a data frame with post and follow-up measurements for approximately 200 people. In the study, we try to find out if there is a correlation between sports participation and distress symptoms. We ...
user avatar
0 votes
0 answers
27 views

Do the p-values produced by lmerTest::lmer need to be adjusted for multiple comparisons?

I am running a fairly simple linear mixed model with multiple observations per patient, comparing a lab value to a reference group (healthy control). Here's some fake data: ...
user avatar
  • 1
0 votes
0 answers
31 views

Investigating the existence of plasticity (random intercept model vs. random slope model) in a response variable that is not normally distributed

I wanted to explore if the change in speed between day and night is similar among a set of individuals. To me, the logic way of testing this hypothesis is running a random intercept model and a random ...
user avatar
  • 125
0 votes
0 answers
16 views

Specifying a correct model using glmmTMB while experiencing unusually large coefficients and z-statistics

I have a data set of an beetle community where I want to analyse species richness (for example). The experimental design is as follows: 4 blocks 19 plots 2 different treatments 3 samples of the ...
user avatar
1 vote
0 answers
30 views
+50

Why do fixed effects in a logistic regression model differ depending on the presence of a random slope?

If I have two linear regression models, one with a random slope and one without (but otherwise identical), the fixed effects in the two models are identical. My understanding is that this stems from ...
user avatar
  • 3,505
0 votes
0 answers
9 views

Understanding the dependencies between random effect values in lmers

I have two related (basic) questions. Linear Mixed Effects models (as implemented for example with the lmer package in R) are hierarchical. I assume that this comes from the assumption that random ...
user avatar
  • 388
2 votes
1 answer
44 views

Random Effect in twin study of both MZ and DZ twin pairs

I am a bit stuck with the use of linear mixed models and its random effects in a twin study analysis. What I have is microbiome data for twins that are from MZ twin pairs and DZ twin pairs, so no ...
user avatar
  • 21
0 votes
0 answers
12 views

Nuisance variable in a repeated-measures one-way ANOVA

I need to perform a one-way repeated measures ANVOA, while accounting for a nuisance covariate that is hypothesized to confound by dependent measure. For each subject I have one value of the dependent ...
user avatar
2 votes
2 answers
40 views

How to report results from linear mixed models: interaction terms changing significance

I've used linear mixed models to test if factors genotype and sex influence colon length, while including batch as a random effect. I first ran the test...
user avatar
0 votes
0 answers
21 views

Variance-covariance structure for random-effects in `lme4` or `nlme` (covariance specification)

I am running a multilevel growth model with multiple random slopes. In the Mplus software, I can specify exactly which random effect covariances are estimated (and which are not). For example, I can ...
user avatar
  • 1
0 votes
1 answer
32 views

Interpreting DHARMa residuals for a glmer.nb regression using count data

1 I am modeling overdispersed count data (detection of species) in a GLMM to account for changes in the number of detections of the individual (response variable) to covid period, area (rural vs urban)...
user avatar
1 vote
0 answers
6 views

Interpreting DHARMa residuals for a glmer.nb regression using count data [duplicate]

I am modeling overdispersed count data (detection of species) in a GLMM to account for changes in the number of detections of the individual (response variable) to covid period, area (rural vs urban) ...
user avatar
2 votes
1 answer
64 views

Post hoc power analysis for multilevel regression analysis

I have a multilevel model with 2 levels (L1 = individuals, at least 710 per country; L2 = countries, 17 total) ...
user avatar
  • 1,448
0 votes
1 answer
25 views

mixed model specification

I have data like This (repeated measures), Testscore is the dependent variable, Time is the measurement time. ...
user avatar
0 votes
0 answers
11 views

Multilevel modeling, null model, R problem: very large eigenvalues

I found a problem when running the null model of my multilevel modeling in Rstudio. This is the error message that I receive ...
user avatar
3 votes
1 answer
53 views

R pairs function, adjust, tukey/tukey-kramer?

In the 'pairs' function when doing pairwise comparisons after emmeans, tukey is set as default for adjustment of p-values. But what type of tukey is used, is it tukey-kramer? How can I know this? If ...
user avatar
1 vote
0 answers
23 views

Using restricted maximum likelihood on marginal residuals

In a mixed-model setting, I want to estimate the variance components and the pertaining random effects of a random-intercept/random-slope model. The coefficients of the fixed effects have already been ...
user avatar
1 vote
1 answer
13 views

Appropriateness of including control variables in lmer as random effects

I am trying to find out the effects of the condition (3 levels) on the dependent variable (intention to use a certain mode of transportation; assumed to be continuous, 1-7 scale), whilst controlling ...
user avatar
2 votes
1 answer
54 views

How do I interpret the results of lme4::rePCA towards diagnosing a singular mixed model?

I'm having a difficult time diagnosing the reasons for singular fits in a business problem I'm working on. The lme4::isSingular documentation recommends ...
user avatar
  • 321
0 votes
0 answers
19 views

R Contrast coding in lmer output interpretation

I want to see if four predictors ("OA_statusclosed" "OA_statusgreen" "OA_statushybrid" "OA_statusbronze") have an effect on "logAlt." I have chosen to ...
user avatar
  • 1
0 votes
0 answers
16 views

Why does the number of parameters increase when fixing correlations in GLMMs?

I have this full model : ...
user avatar
  • 1
0 votes
0 answers
19 views

Mixed model in R: Are ezANOVA (from the ez package) and anova_test (from the rstatix package) fundamentally wrong?

I've recently completed a study on an animal (rat) model of a psychiatric disorder. In summary, the study consists of the following steps: Induction of psychiatric disorder A Behavioral test (test 1) ...
user avatar
0 votes
0 answers
29 views

How to determine if LMER model is specified correctly given output?

I am running a mixed effects model using LMER. In the past I recall seeing groups represented in the summary output with brackets, for example condition[2] would correspond to condition labeled two in ...
user avatar
  • 1
0 votes
0 answers
7 views

What to do when removing a perfectly correlated random slope and intercept stops model from converging?

Occasionally I will build a linear mixed-effects model with random item and subject slopes and intercepts. I'm speaking generally here because it is a general problem. The model will converge, but ...
user avatar
  • 1,641
0 votes
0 answers
15 views

Partially paired data in longitudinal study - Is it valid to estimate pairwise differences between timepoints using lmer?

I am working with data collected from 13 independent participants with 5 dependent samples collected. ...
user avatar
0 votes
0 answers
19 views

lme4/lmerTest nested mixed effect model output missing fixed effect with consistently significant penultimate t-value

I have a mixed effect model with the following fixed effect categories: Error: Y/N Groups: A/B And a random effect for each subject. I am interested in the difference in response variables due error ...
user avatar
0 votes
1 answer
36 views

Power issue for categorical vs. continuous predictor in lmer

I have the following model: ...
user avatar
0 votes
0 answers
23 views

How to estimate/simulate sample size based on glmm?

I would like to estimate the minimum required sample size in R to detect an effect size I found in a recent study. The simulation should be based on an already calculated mixed effects glmm with a ...
user avatar
  • 1
2 votes
1 answer
36 views

In a randomized trial, should we exclude random intercepts and use only slopes?

Let's say I have a longitudinal study, with patients assessed at several time points, which goal is to compare the treatment vs. placebo. If, theoretically, I used a mixed model to analyse the ...
user avatar
1 vote
1 answer
85 views

response mixed effect model

I have created a mixed-effect model which involves drug response, here I have 2-factor level Drug variable of response that is Control or Drug A. The model that I employed is m1 which basically check ...
user avatar

1
2 3 4 5
59