Hi Data Science PWT,
I would like to include some nice-looking model diagnostic plots with a paper, and my all-time favorite model diagnostic tool is the R package DHARMa. However, I want to tweak the output graphs just slightly to make them nicer for inclusion in a manuscript. Smaller points, move the “dispersion test” label so it’s readable, etc. But I can’t figure out how to modify the graphs or recreate the graphs from the simulated residuals. Has anyone done this before? Or have suggestions of other nice diagnostic plots?
Thanks!
library(DHARMa)
### ** Examples from the manual
testData = createData(sampleSize = 200, family = poisson(),
randomEffectVariance = 1, numGroups = 10)
fittedModel <- glm(observedResponse ~ Environment1,
family = "poisson", data = testData)
simulationOutput <- simulateResiduals(fittedModel = fittedModel)
######### main plotting function #############
# for all functions, quantreg = T will be more
# informative, but slower
plot(simulationOutput, quantreg = FALSE)

---
Rosemary Hartman, PhD, she/her
Environmental Program Manager
Rosemary...@water.ca.gov
California Department of Water Resources
M: 916-882-2926

saveourwater.com


Wow, this is PERFECT! Thanks so much!