Whenever we include a random effect in a mixed model, since the estimates are shrunk, isn't it normal at the fundamental level that the residual plot will show a positive correlation between fitted values and residuals?
Here's a super simple model with no fixed effect and, as random effect, 500 subjects observed 4 times:
set.seed(1)
N = 500
R = 4
subjects = rep(factor(1:N),each = R)
mu = rep(runif(N),each = R)
y = mu + 0.2*rnorm(N*R)
df = data.frame(subjects,mu,y)
mdl = lme4::lmer(y ~ 1 + (1|subjects),df)
performance::check_model(mdl)
It feels intuitive to me that estimates being shrunk, subjects with higher (lower) $\mu$ will show a positive (negative) residual.
Is it a problem? How can we diagnose (the linearity of) our models then?
Note: the trend exists also with a normal distribution of $\mu$s.