Skip to content
Prev 20389 / 20628 Next

lmer error: number of observations <= number of random effects

Hi All,

As an FYI, there is no need for this thread to be cross-posted to three different lists: R-help, R-sig-mixed-models and R-devel.

I am removing R-Help and R-Devel from this reply and only replying to the authors and R-sig-mixed-models, which is the appropriate list for this thread.

For any future e-mails to this thread, please only reply to the author(s) and to R-sig-mixed-models, removing the other two lists.

Thank you,

Marc Schwartz
R-Devel Co-Admin


?-----Original Message-----
From: R-sig-mixed-models <r-sig-mixed-models-bounces at r-project.org <mailto:r-sig-mixed-models-bounces at r-project.org>> on behalf of Srinidhi Jayakumar via R-sig-mixed-models <r-sig-mixed-models at r-project.org <mailto:r-sig-mixed-models at r-project.org>>
Reply-To: Srinidhi Jayakumar <srinidhi.jayakumar at stonybrook.edu <mailto:srinidhi.jayakumar at stonybrook.edu>>
Date: Monday, May 6, 2024 at 9:54 AM
To: TT FF <trashfaket at gmail.com <mailto:trashfaket at gmail.com>>
Cc: <r-help at r-project.org <mailto:r-help at r-project.org>>, <r-sig-mixed-models at r-project.org <mailto:r-sig-mixed-models at r-project.org>>, <r-devel at r-project.org <mailto:r-devel at r-project.org>>
Subject: Re: [R-sig-ME] lmer error: number of observations <= number of random effects


Thank you very much for your responses!


What if I reduce the model to
modelLSI3 <- lmer(SA ~ Index1* LSI+ (1+LSI |ID),data = LSIDATA, control =
lmerControl(optimizer ="bobyqa"), REML=TRUE).
This would allow me to see the random effects of LSI and I can drop the
random effect of age (Index1) since I can see that in the unconditional
model [model0 <- lmer(SA ~ Index1+ (1+Index1|ID),data = LSIDATA, control =
lmerControl(optimizer ="bobyqa"), REML=TRUE)]. Would the modelLSI3 also
have a type 1 error?


Thank you,
Srinidhi
On Mon, 6 May 2024, 03:11 TT FF, <trashfaket at gmail.com <mailto:trashfaket at gmail.com>> wrote: