Streamlining of epi modeling tools

Thanks @samabbott, I agree that building a new PPL in R would be both very difficult and probably a waste of resources.

My original thought was not about having a complete PPL (although my remark about Julia seems to suggest this), but to simply have a structure in R to represent the inputs for the inference tool (in stan, this would be data and inits) which reflects the components of our models in a streamlined way. So I’m basically thinking of

tool-specific UI → intermediate data structure → flat list of stan arguments → stan

We partly have this “intermediate data structure” implicitly in our tools (e.g. modules in epinowcast), but I was thinking that if there was an explicit and standardized structure it could be

  1. easier to handle (e.g. there could be options to print the inputs in a conceptually meaningful way, and one would better know what parts of the data must be modified when updating a UI function)
  2. easier to map these inputs out to other inference tools than stan, i.e. requiring less refactoring of the tools-specific interface

For an example, think of a standardized structure in R to represent a renewal process, with certain agreed on attributes that map to variable names in your generative model, and nested attributes for non-parametric smoothing of the growth rate, for a seeding process, and for things suggested above (prior specification, formulas etc.). However this would not have to contain all the details of the modeled likelihood!

I guess my main point is that I think establishing something like the above would be roughly comparable in terms of effort and complexity to building a shared stan library, but potentially more useful in the long-term…