epiforecasts / backcalc

Evaluating approaches to backcalculating cases counts by date of infection from cases counts by date of report
2 stars 1 forks source link

Gp #12

Closed seabbs closed 4 years ago

seabbs commented 4 years ago
jriou commented 4 years ago

Hi Sam,

I think the version with GPs is excellent. I just tested it this morning and it works very well on simulated data:

image

I just fail to have a good estimation of rho (Rhat 1.06), but I only ran 1000 iterations so that might be it. Until now the only thing I would change is the exponential(1) prior on the overdispersion parameter (https://github.com/stan-dev/stan/wiki/Prior-Choice-Recommendations recommends a half-normal prior on the inverse of the parameter).

I will dig up a bit more in the code to get a better handle of the details. Is there anything particular you would want me to focus on?

Congrats on the great work! Julien

seabbs commented 4 years ago

Hi Julien,

Thanks! Ironed out some kinks with it today (including an improved log-normal approximation from @jhellewell14) and it seems to be performing quite nicely apart from some issues with chains getting stuck/being slow to converge.

I think the parameterization of the GP is perhaps a little suspect and improving that would likely help with the initialization and convergence (though as you noted if you let it run for long enough it does converge). I've also been testing its stability on real data with mixed success (sometimes a chain fails for no clear reason or gets stuck in warmup for 2 ~ 3 times longer than other chains).

I've tried both parameterizations for the overdispersion. The main reason I went with the exp(1) was to have an interpretable parameter in the output and to put a little more weight on overdispersion rather than not (as we believe Covid-19 to be overdispersed and all it should do is increase the uncertainty of estimates. Having said that I don't have a strong opinion and if the 1 / half normal works well happy to switch out to it.

It would be really great if you could look over the work I have done and just sense check it a little as I am sure there are some mistakes lurking under the surface. I think I am going to move on from model development for a bit and do some formal testing on a range of scenarios but it would be really great having it fit a bit more smoothly!

The other slightly bigger piece of work that I am interested in but not had any real thoughts about is if there is a way to allow for step changes to occur. Any ideas very welcome.

Going to merge and close this pull request tonight but very happy to keep up the discussion.

Sam