I have a doubt with respect to the estimated marginal means of a linear mixed model. I performed a mixed model like the one in the example below:
library("lme4") library("emmeans") model <- lmer(dep_variable ~ covariate * condition + (condition | subject), dataset) summary(model) anova(model)
After this, I checked the contrasts:
emmeans(model, pairwise ~ condition) emmeans(model, pairwise ~ condition | covariate)
I wanted to check which factors (i.e.,
condition) affected my dependent variable (i.e.,
dep_variable). The dependent variable and the covariate were numeric variables, while
condition was a factor variable with 3 levels.
After performing the model and checking the estimated marginal means, I realized that the estimated marginal means were the same both when I looked at the main effect
condition and when I checked the interaction between
Moreover, I realized that the contrasts of the interaction were centered at the mean value of the covariate (numeric variable).
I have two questions:
Did I make a mistake? If not, can I change the value of my covariate in order to explore the contrasts by "holding" the covariate to another value (not the mean)?