Re: [R] [R-sig-ME] lmer error: number of observations <= number of random effects

2024-05-07 Thread Bert Gunter
I think you should seek out a local statistician with whom to consult if at all possible, as the details of your research goals and the nature of the data you have to meet those goals matter and cannot be effectively discussed in a remote forum like this. That is, to be blunt, you seem to be risk o

Re: [R] [R-sig-ME] lmer error: number of observations <= number of random effects

2024-05-07 Thread Srinidhi Jayakumar via R-help
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) sinc

Re: [R] [R-sig-ME] lmer error: number of observations <= number of random effects

2024-05-06 Thread TT FF
See if this paper may help If it helps reducing the model when you have few observations. the (1|ID) may increase the type 1 error. https://journals.sagepub.com/doi/10.1177/25152459231214454 Best > On 6 May 2024, at 07:45, Thierry Onk

Re: [R] [R-sig-ME] lmer error: number of observations <= number of random effects

2024-05-05 Thread Thierry Onkelinx via R-help
Dear Srinidhi, You are trying to fit 1 random intercept and 2 random slopes per individual, while you have at most 3 observations per individual. You simply don't have enough data to fit the random slopes. Reduce the random part to (1|ID). Best regards, Thierry ir. Thierry Onkelinx Statisticus