Refers to estimated marginal means. These are means predicted by statistical models. A package in R called emmeans is dedicated to predicting these estimates.
Questions tagged [emmeans]
303 questions
0
votes
1 answer
interpret estimated marginal means (emmans aka lsmeans): negative response values
I am working on a a model with lmer where I would like to get estimated marginal means with the emmeanslibrary. This is my dataframe:
df <- structure(list(treatment = structure(c(1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,…

BAlpine
- 111
- 3
- 14
0
votes
1 answer
Tukey test after LMM keeping contrasts
I want to test a 2x3 factorial design and contrasted the variables like this
library(lme4)
library(emmeans)
my.helmert = matrix(c(2, -1, -1, 0, -1, 1), ncol = 2)
contrasts(Target3$mask) = my.helmert
…

Laura S
- 15
- 4
0
votes
0 answers
Tuckey correction for planned contrasts with emmeans and pairs() in R
I have a mixed design with 1 between factor (Group: ASD, CTR) and three within factors (Time: pre, post; Trustee: good, bad; Step: 1,2,3,4,5).
I performed a mixed model anova (type III) with aov_car:
anova <- aov_car(rating ~ time*trustee*step*group…

claudia
- 1
- 2
0
votes
1 answer
R emmeans CLD on a predefined prediction grid
I'm running a regression model with multiple factor and continuous predictors. I need to follow up with multiple comparisons. Following this post, I'm able to run the emmeans correctly, and I seem to get appropriate pairwise comparisons. However, I…

user2602640
- 640
- 6
- 21
0
votes
0 answers
How to successfully download the old version of lsmeans package
I'd like to download version 2.26-3 of lsmeans package.
An error occurs when I try to download an old version of the lsmeans package.
I've tried two options for downloading the old versions of lsmeans.
Option 1)
path<-…

SkipT
- 1
0
votes
1 answer
post hoc - comparison of point on slope to another group
I have a model that combines a dummy and a continuous variable to describe an outcome following a disturbance. So if there was a disturbance, I have time measurements at times 1:16 following the disturbance. If there was no disturbance in the recent…

user2602640
- 640
- 6
- 21
0
votes
1 answer
Can I use emmeans with LME model?
I am using LME model defined like:
mod4.lme <- lme(pRNFL ~ Init.Age + Status + I(Time^2), random= ~1|Patient/EyeID,data = long1, na.action = na.omit)
The output is:
> summary(mod4.lme)
Linear mixed-effects model fit by REML
Data: long1
…

Lili
- 547
- 6
- 19
0
votes
0 answers
Emmeans in LME and adjusting for "time since"
I would like to reassure myself that what I'm doing is right. I am applying an LME model to my data. And I would like to know if the use of EMMEANS to get multiple comparisons is right.
emmeans(mod1.lme, pairwise ~ Status, adjust="bonferroni")
The…

Lili
- 547
- 6
- 19
0
votes
0 answers
Problem analysing LME outcomes when I reduce the number of factors in a variable
I have a variable with 4 factors that I put into the LME model as an independent variable (Status).
The outcome in lme gives me 1 factor as a reference value and the other 3 referenced to that one. I have tried to apply 'emmeans' to get multiple…

Lili
- 547
- 6
- 19
0
votes
0 answers
Different Kenward-Roger degrees of freedom between pbkrtest and emmeans
The Days variable of the sleepstudy dataset is numerical. Therefore it corresponds to a slope in the model M1: Reaction ~ Days + (1|Subject). Let's test the Days effect by comparing M1 to M0: Reaction ~ (1|Subject) with the pbkrtest…

Stéphane Laurent
- 75,186
- 15
- 119
- 225
0
votes
1 answer
R: post-hoc comparisons using estimated marginal means but not assuming equal variances
I am trying to use R to run post-hoc comparisons following a significant interaction for a mixed-method Anova. I would like to do the post-hoc similar to SPSS [EMMEANS=TABLES(Group*time) COMPARE(Group) ADJ(BONFERRONI)], using estimated marginal…

CRI
- 53
- 5
0
votes
1 answer
specs argument in emmeans function with R
I'm trying to figure out to do posthoc test in R with emmeans function from emmeans package. However, I couldn't find out what should I put in specs argument. as far as I understand it is where I put the variables that I want to contrast (my…

Erdem
- 45
- 8
0
votes
1 answer
How are computed the confidence intervals of emmeans when adjusted with Tukey method?
I have troubles to get back to the "CL" values given by the emmeans package.
My first goal was to perform a kind of power study : I am working on plants and I want to see how much I can improve my experimental design for next season to have more…

Maxime
- 3
- 3
0
votes
1 answer
estimated marginal means of a MANCOVA in R
I have constructed a model that accounted for a covariate. There are two dependent variables ("A","B") and two independent variables ("C", "D") and one continuous covariate ("E"). I ran a MANCOVA as follows:
x<-cbind(A,B) #combining dependent…

Douglas
- 223
- 1
- 9
0
votes
1 answer
multiply text in Emmet using any loop
How do you multiply text in Emmet? For example,
div{Some Text} where Some Text repeats in div
div{Some Text*3} and div{Some Text}*3 do not work.
should output
Some Text
Some Text
Some Text
user9371847