epiforecasts / EpiNow2

Estimate Realtime Case Counts and Time-varying Epidemiological Parameters
https://epiforecasts.io/EpiNow2/dev/
Other
114 stars 32 forks source link

Estimation of transition delay distributions from consecutive surveillance time series #229

Closed pitmonticone closed 3 years ago

pitmonticone commented 3 years ago

Hi,

First of all I would like to thank you very much for the active development of this great package!

Now, suppose you have

Would it be sensible to try to estimate transition delay distributions from (primary_incidence, secondary_incidence)? If yes, then what method would you recommend ? Are you thinking about implementing something similar in the near future ?

Thanks.

NB: I first opened it as a discussion, but then I realised it could be also suited as an issue, so I'll post it here too.

seabbs commented 3 years ago

Thanks for this @pitmonticone and apologies for the slow response I've been working on some other projects to give this room to breath before a fresh dev cycle.

So I think you could do this with the tools that are implemented if you were willing to categorise age distributions and fit the delay distributions independently (i.e looping through using estimate_secondary for each one) and then extracting the fit delay distribution and scaling factor (which you could give a prior from the literature). If you had evidence of truncation in your data then you might also need to either adjust for it (using something like estimate_truncation and the truncation support in estimate_secondary) or filter out the data that is truncated (a more conservative and less error prone approach).

This is actually something we have been thinking about a lot and I have been trying some other approaches (see this report which is a WIP). That other approach has coalesced into an extension of the brms package with a convolution model being implemented as a structural equation model (so you can model covariates on the scaling factor, the distribution mean, and the distribution standard deviation). Its all very very early stage but it is available here (I would use the approach above for now for anything serious whilst I explore this in more detail): https://github.com/epiforecasts/idbrms

Sam