I suspect that this may be due to the version of lme4
that you are using. I do not get the the warning. The random effects are estimated slightly differently so it hard to say if your warning is a false positive or not - I suspect that it is, and that the difference in the estimates is due to a different version, since they are very close.
As mentioned in my comment in the question, the variances of the random effects are very small, and I see very little advantage in fitting random slopes. I fitted the model without random slopes and found the fixed effects estimates almost unchanged. Also, a likelihood ratio test shows that the reduced model is indeed preferred.
Here is my relevantsessionInfo()
:
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8 LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel splines stats graphics grDevices utils datasets methods base
other attached packages:
[1] emmeans_1.3.2 bindrcpp_0.2.2 dplyr_0.7.6 lme4_1.1-18-1 Matrix_1.2-15 deming_1.3
[7] rugarch_1.4-1 tfestimators_1.9.1 htmltools_0.3.6 DT_0.4 ggthemes_4.0.1 ggplot2_3.1.0
[13] shiny_1.1.0 magrittr_1.5 rvest_0.3.2 xml2_1.2.0 gbm_2.1.3 lattice_0.20-38
[19] survival_2.43-3 RPostgreSQL_0.6-2 DBI_1.0.0 jsonlite_1.5
And here is the output from fitting the full model and running summary()
:
> lmm1 <- lmer(logRT ~ condition * NumSpk * Group + (condition * NumSpk | Participant), data = Bar_data_RT)
> summary(lmm1)
Linear mixed model fit by REML ['lmerMod']
Formula: logRT ~ condition * NumSpk * Group + (condition * NumSpk | Participant)
Data: Bar_data_RT
REML criterion at convergence: -13991
Scaled residuals:
Min 1Q Median 3Q Max
-5.797 -0.670 -0.104 0.560 3.939
Random effects:
Groups Name Variance Std.Dev. Corr
Participant (Intercept) 0.006919 0.0832
conditiondivided_vs_mean 0.000426 0.0206 -0.48
NumSpk2-1 0.000495 0.0223 -0.16 0.15
NumSpk3-2 0.000208 0.0144 -0.67 -0.13 0.46
conditiondivided_vs_mean:NumSpk2-1 0.000193 0.0139 -0.47 0.30 0.37 0.61
conditiondivided_vs_mean:NumSpk3-2 0.000491 0.0222 0.11 0.02 0.40 -0.04 0.39
Residual 0.015617 0.1250
Number of obs: 11088, groups: Participant, 69
Fixed effects:
Estimate Std. Error t value
(Intercept) 7.112816 0.016751 424.61
conditiondivided_vs_mean 0.019425 0.004574 4.25
NumSpk2-1 0.023218 0.006492 3.58
NumSpk3-2 0.016247 0.005673 2.86
Groupp -0.014598 0.023935 -0.61
Groups 0.043286 0.025137 1.72
conditiondivided_vs_mean:NumSpk2-1 0.004727 0.005482 0.86
conditiondivided_vs_mean:NumSpk3-2 0.030852 0.006599 4.68
conditiondivided_vs_mean:Groupp 0.013792 0.006533 2.11
conditiondivided_vs_mean:Groups -0.014269 0.006896 -2.07
NumSpk2-1:Groupp -0.002179 0.009259 -0.24
NumSpk3-2:Groupp 0.000964 0.008088 0.12
NumSpk2-1:Groups -0.007775 0.009849 -0.79
NumSpk3-2:Groups -0.021268 0.008657 -2.46
conditiondivided_vs_mean:NumSpk2-1:Groupp -0.003391 0.007813 -0.43
conditiondivided_vs_mean:NumSpk3-2:Groupp -0.001763 0.009410 -0.19
conditiondivided_vs_mean:NumSpk2-1:Groups -0.009818 0.008354 -1.18
conditiondivided_vs_mean:NumSpk3-2:Groups -0.009678 0.010024 -0.97
Correlation matrix not shown by default, as p = 18 > 12.
Use print(x, correlation=TRUE) or
vcov(x) if you need it
And finally, the likelihood ratio test:
> lmm0 <- lmer(logRT ~ condition * NumSpk * Group + (1 | Participant), data = Bar_data_RT)
> anova(lmm0, lmm1)
refitting model(s) with ML (instead of REML)
Data: Bar_data_RT
Models:
lmm0: logRT ~ condition * NumSpk * Group + (1 | Participant)
lmm1: logRT ~ condition * NumSpk * Group + (condition * NumSpk | Participant)
Df AIC BIC logLik deviance Chisq Chi Df Pr(>Chisq)
lmm0 20 -13831 -13685 6936 -13871
lmm1 40 -14058 -13766 7069 -14138 267 20 <0.0000000000000002 ***