Questions tagged [lmer]

Function of the lme4 package for running linear mixed-effects regressions.

Function of the package for running linear mixed-effects regressions.

89 questions
2
votes
1 answer

Using lme4 modeling to predict from fixed effects values

I apologize for the novice question, but am new to lme4. I am using lme4 to model the survival of bee colonies among six sites composed of varying types of land use over three years and have produced the following model after already eliminating…
Msmart
  • 23
  • 3
2
votes
0 answers

computational error in lmerTest even with ham-data

lmerTest did not return p-values of my own model; so I tried to reproduce the example from the manual - m <- lmer(Informed.liking ~ Gender+Information+Product +(1|Consumer), data=ham) # gives summary of lmer object. The same as of class merMod but…
2
votes
1 answer

Why lmerTest does not give p-values to some models?

I ran the model: lmer11 <- lmerTest::lmer(duration ~ (1|piece) + (1+color|speaker) + group*color*sex, data=data1.frame, REML=FALSE, na.action=na.omit) The output is similar to lmer. I do not understand as I run the same syntax structure of other…
user3288202
  • 293
  • 1
  • 4
  • 13
2
votes
1 answer

anova() does not display p-value when used with lmerTest

I'm trying to use lmerTest to have p-values for my fixed effects. I have 4 different random intercepts, 3 crossed and one nested : test.reml <- lmerTest::lmer(y ~ s1 + min + cot + min:cot + ge + vis + dur + mo + nps + dist + st1 + st2 + di1 +…
2
votes
2 answers

remove all fixed effects from mixed model

I'm trying to automate a way to identify and remove the fixed effects from a mixed model statement using lmer. Briefly, my approach is to use fixef to get the fixed effects names, then use update to remove those from the model statement. I've run…
jslefche
  • 3,839
  • 7
  • 34
  • 47
2
votes
3 answers

Extract treatment means from an lmer object and calculate error bars

[I'm detailing the experiment I have for background - I am clear on the method for the lmers, just unclear on how to extract some values I need/calculate them by hand, hence I posted this on SO and not CV. I hope this was the correct place to…
Sarah
  • 719
  • 2
  • 9
  • 23
2
votes
1 answer

R blmer() how to adjust residual variance to be not fixed at 1?

I am dealing with blmer() function in blme package in R, my sim data has a sigma.epsilon not equal to 1. However when I used blmer() to estimate, I found that in all cases the output residual variance is 1. This is contrary to my initial case hence…
Lisa
  • 161
  • 6
2
votes
2 answers

Change intercept using lmer function in R

I am trying to use the lmer function to investigate if there is an interaction effect on the reaction time (RT) between 3 different conditions (cond=0, 1, 2) and the presence of the target (target=False or True) in patients (Patient). I wrote the…
Alba
  • 183
  • 1
  • 2
  • 8
2
votes
0 answers

Creating boxplot of MAM that has two categorical explanatory variables

I am trying to create graphical representation of my MAM which is explained by two categorial variables. I realise I need to make 2 boxplot to show the effect of each explanatory variable as the interaction between the two is insignificant. How do I…
1
vote
0 answers

R - lmer drops unused levels in a random effect

I am calling the lFormula function in lmer (lme4 1.1-9) to get the transpose of the sparse model matrix of a random effect (Zt). The problem is that unused levels are dropped in the output matrix. Is-there a way to get around this? I realize that…
Nicolas
  • 105
  • 2
  • 9
1
vote
4 answers

Confidence interval of random effects with lmer

I am using lmer from lme4 package to calculate confidence interval for variance component . When I fit the model there is warning messages : fit <- lmer(Y~X+Z+X:Z+(X|group),data=sim_data) Warning messages: 1: In checkConv(attr(opt, "derivs"),…
user81411
  • 407
  • 5
  • 12
1
vote
2 answers

Can plot interaction means for nlme fit, but not for lme4

Using this dummy dataset: dummy.data <- data.frame(vaccinated = factor(rep(c("yes", "no"), each = 64)), infected = factor(rep(c("yes", "no"), each = 32)), animal = factor(rep(1:16, each = 8)), tissue = factor(c("blood", "liver", "kidney",…
tractorjack
  • 127
  • 8
1
vote
0 answers

How to access sapply output including lmer

I'm trying to estimate and simulate various models. I can fit many models with sapply but somehow, I'm unable to access the output. models <- sapply("accept.progov ~ ptot_dev+swacceptcn+(swacceptcn|coal.general)", FUN = function(X) lmer(X,…
Thomas
  • 1,320
  • 1
  • 18
  • 36
1
vote
0 answers

Discrepancy in lme output and raw data

I ran a model with reaction time as my DV and PWI Condition as one of the fixed factors. I used contr.sum for all fixed factors. I ran the following model to look for differences in reaction time scores across three different IV's (2 levels…
asudar
  • 11
  • 3
1
vote
1 answer

Nested model in R

I'm having a huge problem with a nested model I am trying to fit in R. I have response time experiment with 2 conditions with 46 people each and 32 measures each. I would like measures to be nested within people and people nested within conditions,…
Lisa
  • 11
  • 1