I am trying to do a research article on morbidity, which is categorical, i.e., yes or no. I also consider fixed and random effects, given that all of the fixed effect covariates are categorical. Here is the model.
twoRIM <- glmer(morbidity ~ co_fuel + wealth + san_class + residencey + education + marital + age + parity + Electricity_avaliablity + education * age + (1|region) + (1|participant_id), family=binomial, data=M)
Hence, I try to compare these two random intercept models to a model that has a single random intercept mode. Based on AIC, the model "twoRIM" is the best model because it has the lowest AIC. Then I tried to check the model diagnostics of this model, model "twoRIM", by running the following R codes. I got the following results or plots.
scatter.smooth(fitted(twoRIM), sqrt(abs(resid(twoRIM))), col=6)
qqline(resid(twoRIM))
plot(twoRIM)
qqnorm(resid(twoRIM),main="Residual normal plot",col=4,adj=0.1)
qqnorm(ranef(twoRIM)$"region"
[[1]],main="Regional level random effects",col=2,adj=0.1)
qqnorm(ranef(twoRIM)$"participant_id"[[1]],main="Cluster level random effects",col=6,adj=0.1)
plot(fitted(twoRIM),resid(twoRIM),col=4)
qqnorm(resid(twoRIM))
The plots I got — the residual and other related plots — are quite different from other forms of model diagnosis I knew before, and I faced a bit more difficulty interpreting and understanding the nuance of these plots. Maybe I took the codes and arguments wrongly?