Mollie Brooks
2018-05-21 14:08:04 UTC
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
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
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/
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
[[alternative HTML version deleted]]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/
-----Original Message-----
project.org] On Behalf Of Irene Rojo
Sent: Monday, May 21, 2018 4:52 AM
Subject: [R-sig-ME] Cheking for outliers after fitting a glmmTMB
Dear all,
I am trying to check the assumptions after fitting a glmm with the glmmTMB
package.
However, I don't know how to get the Residuals vs Leverage plot and Cook's
distance. Neither the "leveragePlot(model)" nor "leverage.plot(model)"
functions do work with an object of class glmmTMB. Can anyone give some
advice of how can I get it?
Thank you so much,
Irene
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
_______________________________________________project.org] On Behalf Of Irene Rojo
Sent: Monday, May 21, 2018 4:52 AM
Subject: [R-sig-ME] Cheking for outliers after fitting a glmmTMB
Dear all,
I am trying to check the assumptions after fitting a glmm with the glmmTMB
package.
However, I don't know how to get the Residuals vs Leverage plot and Cook's
distance. Neither the "leveragePlot(model)" nor "leverage.plot(model)"
functions do work with an object of class glmmTMB. Can anyone give some
advice of how can I get it?
Thank you so much,
Irene
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models