library(RePsychLing) library(lme4) library(knitr) opts_chunk$set(comment=NA) options(width=92,show.signif.stars = FALSE)
These data, also used in the online supplement to @Barr:Levy:Scheepers:Tily:13, are available as gb12
in the RePsychLing
package.
str(gb12) summary(gb12)
We assume P
, the partner, is a between-session factor and F
, feedback, is a between-item factor (i.e., they are not included in RE terms). The model fit in the paper is:
m0 <- lmer( sottrunc2 ~ 1+T+P+F+TP+TF+PF+TPF+(1+T+F+TF|session)+(1+T+P+TP|item), gb12, REML=FALSE, start=thcvg$gb12$m0, control=lmerControl(optimizer="Nelder_Mead",optCtrl=list(maxfun=1L), check.conv.grad="ignore",check.conv.hess="ignore")) print(summary(m0),corr=FALSE)
The model converges without problems, but two correlation parameters are estimated as 1.
summary(rePCA(m0))
The PCA results indicate two dimensions with no variability in the random effects for session and another two dimensions in the random effects for item.
m1 <- lmer(sottrunc2 ~ 1+T+P+F+TP+TF+PF+TPF + (1+T+F+TF||session) + (1+T+P+TP||item), gb12, REML=FALSE) VarCorr(m1) anova(m1, m0)
The zcpLMM fits significantly worse than the maxLMM, but it reveals several variance components with values close to or of zero.
Let's refit the model without small variance components.
m2 <- lmer(sottrunc2 ~ 1+T+P+F+TP+TF+PF+TPF + (1+T+F||session) + (1+T||item), gb12, REML=FALSE) VarCorr(m2) anova(m2, m1, m0)
Let's check the support of item-related variance components
m3 <- lmer(sottrunc2 ~ 1+T+P+F+TP+TF+PF+TPF + (1+T+F||session) + (1|item), gb12, REML=FALSE) VarCorr(m3) anova(m3, m2)
Marginally significant drop. (Deleting the intercept too leads to a significant drop in goodness of fit.)
Let's check correlation parameters for item
m4 <- lmer(sottrunc2 ~ 1+T+P+F+TP+TF+PF+TPF + (1+T+F|session) + (1|item), gb12, REML=FALSE) VarCorr(m4) anova(m3, m4)
The correlation parameter is significant, but one correlation is 1.000, indicating a singular model. Let's remove the small correlation parameters.
m5 <- lmer(sottrunc2 ~ 1+T+P+F+TP+TF+PF+TPF + (1+F|session) + (0+T|session) + (1|item), gb12, REML=FALSE) VarCorr(m5) anova(m5, m4)
Now the model is clearly degenerate: The correlation is at the boundary (-1); theta
returns a zero value for one of the variance components.
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.