Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Censoring and truncation in DHARMa #120

Open
florianhartig opened this issue Aug 29, 2019 · 4 comments
Open

Censoring and truncation in DHARMa #120

florianhartig opened this issue Aug 29, 2019 · 4 comments

Comments

@florianhartig
Copy link
Owner

From https://twitter.com/staffanbetner/status/1166821587171074049

How to handle censored response (discrete/cont.) with randomized quantile residuals? I'm a bit uncertain whether the property of uniformly distributed residuals holds if we both randomize at the Y part, as well at the cdf part. Although I suspect it might hold under random censoring (which is a very interesting concept if we consider interval censoring at a distribution with domain from -inf to inf)

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 #101

Keeping this open as a reminder to add an example / test this out!

@StaffanBetner
Copy link
Contributor

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.

@StaffanBetner
Copy link
Contributor

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

@florianhartig
Copy link
Owner Author

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.

@StaffanBetner
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants