Skip to content

DHARMa residuals with delta models #117

Answered by seananderson
seananderson asked this question in Q&A
Discussion options

You must be logged in to vote

They should just work for the full delta-gamma model prediction. If you want to look at the 2 parts separately, you'll need to build the DHARMa object yourself though because dharma_residuals() always works with the full prediction. See below.

Also, note these DHARMa residuals for spatial models can often show patterns even when everything is just fine. The MCMC residuals are probably best (residuals(fit, type = "mle-mcmc")) see ?residuals.sdmTMB and https://pbs-assess.github.io/sdmTMB/articles/residual-checking.html but they can be slow to calculate.

library(sdmTMB)
pcod_spde <- make_mesh(pcod, c("X", "Y"), cutoff = 15)

# Look at using dharma_residuals on aggregate
fit <- sdmTMB(density ~ 

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by seananderson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant