I am dealing with a dataset with the majority of entries with one value per individual but, with three cases with 2 repeated measures each. My first approach would be to pursue linear mixed models, to account for the repeated entries.
I've recreated a workable example:
set.seed(123) ss<-data.frame(ID=c(paste0("ID",seq(1:100)),rep(c("ID101","ID102","ID103"),2)), expl=rnorm(106),dep=rnorm(106)) lmerTest::lmer(dep~expl+(1+expl|ID),data=ss)
This model makes sense to me, considering that for each measure of ID101, 102 and 103 the intercept and the slope for 'expl" may be different. Nevertheless, as it is expected, an error is produced:
Error: number of observations (=106) <= number of random effects (=206) for term (1 + expl | ID); the random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable
Should I try to simplify the mixed model to include only the intercept? Or should I try another approach?
Thanks in advance!