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

How to incorporate robust standard erros in multi-level model (MLM) using lme4

I am using lme4 package to build a multi-level model. It can be said that my data has three levels: company level, industry level, year level. However, adding all three levels in a model returns a singular fit. That is why I am thinking of leaving…
Egor
  • 35
  • 3
0
votes
0 answers

Make summary output of lmer model use the actual names for the factor levels

Output of summary() changes the names of my factor levels so that I have no idea which effect corresponds to which level in my data. For example, it will change levels of the factor "hemisphere" from (lh, rh) to (hemi1, hemi2). This becomes a…
Joe K
  • 11
  • 2
0
votes
1 answer

Variance Homogeneity for a model created with lmerTest

I have run the model: model2 <- lmer(tas ~ station + (1|date), data = all5) where station is a categorical variable with 4 levels. I want to check for variance homogeneity. I find the residuals from lmerresid <- resid(model2). If I…
lola
  • 145
  • 1
  • 9
0
votes
2 answers

glmer in R: summary and tab_model giving different values

I have been running glmer in R and using summary to extract values for write up: model.CERT=glmer(certain2 ~ cuecong2 + hmaxCS*rotcat2 + (1|ParticipantPrivateID), data=data,family=binomial(link = "logit")); certain2=categorical predictor (labelled…
JayBee
  • 101
0
votes
0 answers

Why does the output of of a linear mixed model using lmer not include all of the named Camps/Locations?

Question: How can I get the response variable "Camp" to show all 4 camps/locations into the output. On the below output it shows CampKM20, CampZNS, CampHormiguero, but the 4th camp "Dos Naciones" is missing. How can I get the output to include…
Hefin
  • 1
  • 1
0
votes
0 answers

perform perm.lmer test across multiple channels (including random effects)

I have a large dataset with EEG data where I have several columns: channel (58), subject (24), condition (3), trial_nb (with the number of each trial), and then I have individual columns for each data point from -200 to 1100ms where I have the data…
0
votes
0 answers

Use ggplot and lmerTest in R running with Ubuntu

for my Statistical analyses, I need to use the Packages ggplot2 and lmerTest. While installing lmerTest I updated R and was able to use the function. But after this update, I was not able to use ggplot2 anymore. So I downgraded it. If I want to…
MaryJule
  • 23
  • 5
0
votes
0 answers

Strategy to study random effects with package lme4 or lmertest?

I have a training dataset (95 840 rows) with: str(train) $ NUM_DEVICE_ID_COUPON : Factor w/ 9 levels "8647","8666",..: 3 4 5 8 9 1 2 3 4 6 ... $ TEMPERATURE_AIR : num 6.29 6.13 6 7.05 8.16 ... $ MonthNumber : Factor…
Theo75
  • 477
  • 4
  • 14
0
votes
1 answer

R Error in model.frame.default - Variable lengths differ

Very first post here, also, this is only my second time using R, so please be gentle. I'm working on a project where I in R am trying to make multiple analyses using the lme4 and lmeTest packages via their lmer function. To do so I have list of the…
MNTsnowman
  • 9
  • 1
  • 3
0
votes
0 answers

Why do I get a 'bad data' error in glmer?

I want to remove outliers (with residuals beyond 2.5sd) from my model. I have tried this code: acc.glmer1=glmer(correct_answer ~ condition + (1|Participant) + (1|word), data = ldt[abs(scale(resid(acc.glmer)))<2.5,], family="binomial") and I get…
Katerina
  • 11
  • 1
0
votes
1 answer

Error post hoc emmeans for lmerTest model with many observations

I ran a mixed model with lmerTest and I need a post-hoc test. The following is the model, each trial in a row. Then, I use emmeans but get the following error (probably because of the large number of observations). I would appreciate help or another…
0
votes
0 answers

Power simulation in R for a linear mixed model

I need to do a linear mixed model simulation to get power for varying sample sizes. My model is: Ratings = y Fixed effect, x = Ring Random effect = participants The code I tried is below. It only returns 'Based on 100 simulations, (0 warnings, 100…
semchena31
  • 51
  • 1
  • 7
0
votes
2 answers

Why do I get empty results with ls_means statement in lmerTest?

Here's my data: subject arm treat bline change 'subject1' 'L' N 6.3597 4.9281 'subject1' 'R' T 10.3499 1.8915 'subject3' 'L' N 12.4108 -0.9008 'subject3' 'R' T 13.2422 -0.7357 'subject4' 'L' T 8.7383 2.756 'subject4' 'R' N …
Statbong
  • 3
  • 2
0
votes
1 answer

Plotting an interaction with confidence intervals from an lme4 or LmerTest model in R

Using dat (found here), I run the following model: library(lmerTest) model <- lmerTest::lmer(eval ~ post + ess + post*ess + (1|ID), data = dat) The output of summary(model) indicates the interaction term is significant: Linear mixed model fit by…
J.Q
  • 971
  • 1
  • 14
  • 29
0
votes
1 answer

Linear mixed model comparison with ANOVA R

I have two models: model1 = y~ a+b*c+ 1|d model2 = y~ a*e+c+1|d I wanted to compare how they do. anova(model1, model2) This is the result: Why is the p value 0? Thank you! Desperate grad student
semchena31
  • 51
  • 1
  • 7