DHARMa
DHARMa copied to clipboard
Add DHARMa support for VGAM and svyVGAM
Request in https://github.com/florianhartig/DHARMa/issues/321 requires support for VGAM and svyVGAM.
Perspective for this request: It seems that VGAM is implementing a simulate function, so in principle, it should be possible to support VGAM and derived packages.
Interim solution take your fitted model, simulate new data (using simulate), and feed this into createDHARMa - this will allow you to use most DHARMa functions. A code example is here. The vignette has some further comments / examples on creating custom simulation functions and reading them into DHARMa.
** Statistical doubt ** One open question for me on this is how the survey weights work exactly - for DHARMa to make sense, there needs to be a data-generating process that one can simulate from. Simple likelihood weights n GLMMs typically break this property. I have no experience with VGAM and svyGAM, so I have to read up / check how the survey weights are treated in the models and if the weights result in a likelihood (= data-generating model exist) or in a pseudo-likelihood.