epinowcast / primarycensored

Primary event censored distributions in R and Stan.
https://primarycensored.epinowcast.org/
Other
7 stars 1 forks source link

Add heuristics when the relative_obs_time is much bigger than the maximum observed delay #69

Closed seabbs closed 1 week ago

seabbs commented 3 weeks ago

Compute time in both R and stan scales with unique combinations. We can reduce these by providing a heuristic when D is much longer than the maximum specified delay for that D. This is because when this is the case it is unlikely that truncation is playing a role and so the user can safely set D to inf here (in a large data set this could hugely reduce the number of unique combinations and hence run time).

I think it makes sense to do this on the stan side via the data preprocessing in pcd_as_cmdstan_data() with both a function to message a warning and a function to alter D and combine now non-unique pairings.

On the R side, I am less clear what this looks like. This was motivated by exploring performance in #67