Skip to content

Cheking for outliers after fitting a glmmTMB

2 messages · John Fox, Mollie Brooks

#
Dear Irene,

You're apparently trying to use the leveragePlot() function in the car package. That doesn't plot residuals vs. hat-values (leverages) but is rather a variation on added-variable plots. 

The car package does have some influence diagnostics for mixed models, but unfortunately only for models fit with functions in the lme4 and nlme packages. See ?influence.mixed.models . Perhaps you can adapt our code to the glmmTMB package.

I hope this helps,
 John

-----------------------------
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web: socialsciences.mcmaster.ca/jfox/
#
Hi Irene,

Some residual diagnostics can be done with the DHARMa package, but maybe not Cook?s distance and leverage. 

Here?s the main documentation
https://cran.r-project.org/web/packages/DHARMa/vignettes/DHARMa.html <https://cran.r-project.org/web/packages/DHARMa/vignettes/DHARMa.html>

and here?s a discussion about using it with glmmTMB
https://github.com/florianhartig/DHARMa/issues/16 <https://github.com/florianhartig/DHARMa/issues/16>

cheers,
Mollie

???????????
Mollie E. Brooks, Ph.D.
Research Scientist
National Institute of Aquatic Resources
Technical University of Denmark