Questions tagged [lmertest]

An R package providing different kinds of tests for linear mixed effects models as implemented in 'lme4' package.

62 questions
0
votes
0 answers

lmerTest in R versus lme in statsmodels/Python

I do have a complex linear mixed effect model. model_lme = MixedLM.from_formula("Ratings ~ LCDev455*ST0LT1*TargetType*Female0Male1", groups=data["ResponseID"], data=data) model_lme = model_lme.fit() model_lme.summary() This perfectly works in R,…
semchena31
  • 51
  • 1
  • 7
0
votes
1 answer

mice's pool.compare gives "Error: No glance method for objects of class call" for lmerTest models

I'm trying to compare two models built using multiple imputations. When I try to compare the models, mice's pool.compare() gives the error that Error: No glance method for objects of class call or Error: unequal number of imputations for 'fit1' and…
J.Sabree
  • 2,280
  • 19
  • 48
0
votes
0 answers

singular fit in one simple model but not in another using lmer R

I'm running a multilevel model using lmerTest in which employees are nested in teams and departments. I'm taking a model comparison approach, so I'm building the model with just the random effects. Here are the results when I use the two random…
J.Sabree
  • 2,280
  • 19
  • 48
0
votes
0 answers

Stepwise regression in r with mixed models: numbers of rows changing

Employing the lmerTest package in r, I am using the syntax below to run a stepwise selection on a mixed model containing 2 continuous predictors (Duration, PrevSegDuration), 1 categorical factor (PrevSeg), and 1 random effect factor (Respondent). m1…
jjcii
  • 139
  • 3
  • 10
0
votes
1 answer

Adjust p-values obtained with lmerTest::lmer() for multiple comparisons

I want to fit linear mixed models using lmerTest::lmer() and gradually add random and fixed effects (see code below). Later I aim to compile a regression table including all models with jtools::export_summs() or huxtable::huxreg(). Before this…
mavericks
  • 1,005
  • 17
  • 42
0
votes
1 answer

Why I get Estimate Std. in negative when the data I am using never can be negative?

I am running a script to find out differences between songs of birds (comparing different lengths, frequencies and others). I am using linear mixed effects with lme4 package. I get as an outcome of negative Estimate Std. and since (for instance) the…
0
votes
0 answers

p values in lmer using lmer Test. Running the model multiple times to get robust p values?

I use lmerTest to obtain p values for my lmer models in R. Unfortunately, running the model multiple times give me different p values each time. Is there a way running the model multiple times to calculate one robust p value? Any other way to obtain…
0
votes
1 answer

Dunnett test for mixed effect model of incomplete block design in R

(First question here on SO, apologies for any mistakes!) I'm trying to analyse data with a linear mixed model accounting for block (Plot) and genotype (Line) effects with Welch-Satterthwaite adjustment of degrees of freedom to account for the…
0
votes
0 answers

Load error for R package 'lmerTest': "package or namespace load failed"

I'm unable to get the lmerTest R package to work (it's used to provide statistical tests for objects created with the lme4 package) When I load it, it gives the following error Loading required package: Matrix Loading required package: lme4 Error:…
Eldur
  • 35
  • 1
  • 6
0
votes
1 answer

rand() from lmerTest: how to deal with missing values?

I am working with a large dataset and analyzing a continuous dependent variable with a linear mixed effects model using the R package lme4. I am also using the extension lmerTest, which allows to compute various plots and the p-values associated…
Mehdi.K
  • 371
  • 4
  • 15
0
votes
0 answers

Trying to use lsmeans without package "lmerTest"

I am running the following mixed model using the package lme4: moms.rest.lmer <- lmer(rest ~ habitat + (1|year) + (1|ID)) where rest is a numeric value, and habitat is a factor variable with 3 levels. I am trying to get pairwise comparisons of the…
0
votes
1 answer

lmerTest::anova not showing p-values

I am asking a new question because the dublicate (anova() does not display p-value when used with lmerTest) is not really providing an answer: I ran into the same problem that lmerTest::anova will not output degrees of freedom and p-values for a…
lilla
  • 151
  • 3
  • 12
0
votes
1 answer

Getting p-values for the comparisons by cld in R

The code and output below give me the interpretation that I want - i.e. the bottom two contrasts aren't significantly different but the third is different than the other two. How can I find the comparisons and p-values used for this comparison?…
user1329307
  • 117
  • 2
  • 16
0
votes
1 answer

Plotting fixed effects slope from lmer model

I have the following dataset : > dput(df) structure(list(Subject = c(1L, 2L, 3L, 5L, 6L, 6L, 6L, 7L, 7L, 7L, 8L, 8L, 8L, 9L, 9L, 9L, 10L, 10L, 11L, 11L, 11L, 12L, 12L, 13L, 13L, 14L, 14L, 15L, 15L, 16L, 16L, 16L, 17L, 17L, 17L, 18L, 18L,…
A. Oye
  • 3
  • 3
-1
votes
1 answer

use name_repair for mids object in mice

I have a set of 5 datasets that were generated through multiple imputation using the mice package. I'm running a hierarchical regression on these datasets, but when I try to pool the results, I get an error that "Column 6 must be named" and to use…
J.Sabree
  • 2,280
  • 19
  • 48