Diagnostics of the logistic regression model of mixed effects using lmer () in an r-project

I am trying to diagnose the logistic regression model of mixed effects below.

mod <- lmer(CEever ~ (1|SL) + birthWeightCat + AFno + FRAgeY*factor(genCat) + damGirBir + factor(YNSUPPLEM), data=Data, family="binomial") 

The data for this model are presented as:

 head(data) CalfID CEever birthWeightCat AFno FRAgeY damGirBir YNSUPPLEM 305 CA010110001 1 <20 2 48 140.0 1 306 CA010110002 1 21-25 1 45 144.0 0 307 CA010110004 0 21-25 1 47 151.5 0 308 CA010110005 0 <20 2 71 147.0 0 309 CA010110006 0 <20 1 57 141.5 1 310 CA010110007 0 <20 1 53 141.5 1 

I can build the leftovers:

 res <- resid(mod) plot(res) 

.... but cannot get values โ€‹โ€‹for shoulder or Cook Distance and Dfbeta.

Firstly, these are useful methods to use with this type of model, and then, if so, what code do people use to get these values.

+6
source share
2 answers

See impact.ME package in CRAN.

+4
source
 alt.est <- influence(modJ, group = "SL") 

will create an estex object from which you can get dfbetas, cooks d etc.

 alt.est.cooks <- cooks.distance(alt.est) alt.est.dfB <- dbetas(alt.est) 
0
source

Source: https://habr.com/ru/post/899539/


All Articles