[R-sig-ME] testing random slopes in three-level models & error message

Thierry Onkelinx thierry.onkelinx at inbo.be
Tue Sep 15 17:37:28 CEST 2015

Dear Charlotte,

The error message seems to be quite clear: you're model is too complex
for your dataset. So either simplify to model or get more data.

Best regards,
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht

To call in the statistician after the experiment is done may be no
more than asking him to perform a post-mortem examination: he may be
able to say what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does
not ensure that a reasonable answer can be extracted from a given body
of data. ~ John Tukey

2015-09-15 14:47 GMT+02:00 Charlotte Arndt <arndtch op uni-landau.de>:
> Hi all,
> I have two questions, one regarding the testing of random slopes in
> three-level models and one regarding an error message:
> My data have a three-level structure: Items (level 1, n=6111) are nested
> within measurement occasions (level 2, n=2111), and measurement
> occasions are nested within persons (level 3, n=84). I assume a
> curvilinear relationship between one predictor and one outcome (both at
> level 1), so I included a linear and a squared term as predictors in my
> model. I am mainly interested in the fixed effects but to find out the
> "best" model to report, I want to test whether random slopes are needed
> at level 2 and/or level 3.
> I wonder whether there is any "best practice" in which order the random
> slopes should be tested in three-level models?
> I tried to compute a full model (random slopes for all terms at both
> levels) to compare this with models in which only one of the four random
> terms was fixed (this was done for all four possible random slopes).
> Using lme4, I got an error message with regard to the full model :
>>mod.full <- lmer(OUTCOME ~ 1 + PRED.linear + PRED.squared + (1 +
> PRED.linear + PRED.squared| ID.L2) + (1 +
> PRED.linear + PRED.squared  | ID.L3), data)
> Error: number of observations (=6111) <= number of random effects
> (=6333) for term (1 + PRED.linear + PRED.squared | ID.L2); the
> random-effects parameters and the residual variance (or scale parameter)
> are probably unidentifiable
> If more information is needed, please let me know.
> Thanks,
> Charlotte
> --
> ******************************
> Charlotte Arndt
> Department of Psychology
> University of Koblenz-Landau
> Fortstr. 7
> 76829 Landau, Germany
> E-Mail: arndtch op uni-landau.de
>         [[alternative HTML version deleted]]
> _______________________________________________
> R-sig-mixed-models op r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

More information about the R-sig-mixed-models mailing list