Open florianhartig opened 3 years ago
Hi,
OK, there are two aspects here, 1) how to use DHARMa for multivariate responses in general, and 2) how to technically integrate the model.
About 1: I have had various discussions about this in the past, and there are certainly several options. One of the easiest, however, would be simply to "flatten" your multivariate response (i.e. make it a vector), and run it through DHARMa. You can then still subset residuals (e.g. response 1) for particular plots if you want. If this makes sense for your particular problem I can't say without knowing more about what you are doing.
I would also be open to implement additional checks for multivariate responses. I guess the general question is how to best test these residuals. I'm not convinced that testing each margin separately is extracting the maximum info in every case. Residual problems could, e.g., be in the correlation of that margins
About 2: It depends on what you mean by "acceptable". If you want to do this for your package, everything is fine of course. If you want me to consider integrating what you do into DHARMa, then you have to follow the advice in https://github.com/florianhartig/DHARMa/wiki/Adding-new-R-packages-to-DHARMA , which I have just updated a bit, because of recent changes for the 3.4 version. The bottomline of the updates is: the entire communication / documentation with other packages is now handled via the S3 functions in https://github.com/florianhartig/DHARMa/blob/master/DHARMa/R/compatibility.R, so if you can supply this (either in DHARMa or in your package), DHARMa will work with your model classes.
Best, Florian
p.s.: just realized this is related to https://github.com/florianhartig/DHARMa/issues/189
Question from a user: