# NOT RUN {
# }
# NOT RUN {
data(primingHeid)
library(lme4)
# remove extreme outliers
primingHeid = primingHeid[primingHeid$RT < 7.1,]
# fit mixed-effects model
# we will stay as close to the older optimizer of lme4 as possible -
# this requires the optimx package and using the control option of lmer()
require(optimx)
require(lmerTest)
primingHeid.lmer = lmer(RT ~ RTtoPrime * ResponseToPrime +
Condition + (1|Subject) + (1|Word), data = primingHeid,
control=lmerControl(optimizer="optimx",optCtrl=list(method="nlminb")))
summary(primingHeid.lmer)
anova(primingHeid.lmer)
# }
Run the code above in your browser using DataLab