# NOT RUN {
data(primingHeid)
require(lme4)
require(lmerTest)
require(optimx)
primingHeid.lmer = lmer(RT ~ RTtoPrime * ResponseToPrime + Condition +
(1|Subject) + (1|Word),
control=lmerControl(optimizer="optimx",optCtrl=list(method="nlminb")),
data = primingHeid)
summary(primingHeid.lmer)
# model criticism
primingHeid.lmer = lmer(RT ~ RTtoPrime * ResponseToPrime + Condition +
(1|Subject) + (1|Word),
control=lmerControl(optimizer="optimx",optCtrl=list(method="nlminb")),
data = primingHeid[abs(scale(resid(primingHeid.lmer)))<2.5,])
summary(primingHeid.lmer)
# }
Run the code above in your browser using DataLab