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

estimate_delays -> estimate_dist #350

Open
seabbs opened this issue Jan 24, 2023 · 4 comments
Open

estimate_delays -> estimate_dist #350

seabbs opened this issue Jan 24, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@seabbs
Copy link
Contributor

seabbs commented Jan 24, 2023

It would make sense to generalise and simplify the current functionality of estimate_delays into a new function called estimate_dist (to highlight it isn't just distributions we are estimating).

Based on lessons learnt in dynamictruncation we can now also do quite a bit better with a simple model and support right and potentially left truncation adjustment using the non-latent formulation.

This would only require some small adaption of the stan code with the majority of the work being to reduce the current 3 distribution model into one. This would also slightly reduce compilation times which I think everyone would like.

The argument to not making this model is that it can be trivially implemented in brms but I think many users may not realise this and there may be value in supplying a simple but still valid model to compete with the simple but not as valid alternatives.

@seabbs seabbs added the enhancement New feature or request label Jan 24, 2023
@sbfnk sbfnk mentioned this issue Jul 18, 2023
18 tasks
@sbfnk
Copy link
Contributor

sbfnk commented Nov 2, 2023

An example of how this could be done in stan is in https://github.com/epiforecasts/marburg.parameters/blob/main/inst/stan/model.stan

@jamesmbaazam jamesmbaazam moved this to Todo in EpiNow2 v2.0.0 Nov 10, 2023
@seabbs seabbs self-assigned this Aug 1, 2024
@seabbs
Copy link
Contributor Author

seabbs commented Aug 1, 2024

This is the current candidate model for implementation. In the first pass this would be constrained to daily events but should have better scaling with large amounts of data.

@seabbs
Copy link
Contributor Author

seabbs commented Sep 17, 2024

There is now an efficient model available in primarycensoreddist we can wrap + provide nice user interface for. See here: https://primarycensoreddist.epinowcast.org/dev/articles/fitting-dists-with-stan.html#using-pcd_cmdstan_model-for-a-more-efficient-approach

Whilst this is currently several orders of magnitude faster than previous approaches it should shortly get an order of magnitude faster (at least) as we slot in analytical solutions to common primary and delay distribution combinations.

@seabbs
Copy link
Contributor Author

seabbs commented Sep 19, 2024

@sbfnk as discussed f2f today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants