Open florianhartig opened 5 years ago
Copying my last comment from Twitter:
Well, I thought about this for a bit and realized that the only thing that is adjusted is that the range of where on the uniform interval the sampling occurs! (and that it occurs at all with censored continuous response). Truncation is a different beast, since the distribution is different, so sampling from that wouldn't be any trouble.
I think this is sort of the same approach as DHARMa uses? (The notation is a bit tricky to follow) https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6133273
Hi Staffan,
thanks for the link, interesting! Skimming the paper, it seemed to me that this (conditional) surrogate distribution they use is somehow different to the DHARMa approach where the distribution is always the ecdf of the simulated data, but I would have to read this more thoroughly. If you have more insights on this feel free to comment.
This is one approach to this for models fitted via MCMC methods but easy to extend to models fitted via MLE. https://mjskay.github.io/tidybayes/articles/tidybayes-residuals.html
From https://twitter.com/staffanbetner/status/1166821587171074049
I think truncation and censoring shouldn't be a problem as long as the data simulation is exactly mimicking this process. In case of censoring, you will probably have to randomize (in DHARMa -> integer = T). See also https://github.com/florianhartig/DHARMa/issues/101
Keeping this open as a reminder to add an example / test this out!