  We propose a general Bayesian approach to modeling epidemics such as
COVID-19. The approach grew out of specific analyses conducted during the
pandemic, in particular an analysis concerning the effects of
non-pharmaceutical interventions (NPIs) in reducing COVID-19 transmission in 11
European countries. The model parameterizes the time varying reproduction
number $R_t$ through a regression framework in which covariates can e.g be
governmental interventions or changes in mobility patterns. This allows a joint
fit across regions and partial pooling to share strength. This innovation was
critical to our timely estimates of the impact of lockdown and other NPIs in
the European epidemics, whose validity was borne out by the subsequent course
of the epidemic. Our framework provides a fully generative model for latent
infections and observations deriving from them, including deaths, cases,
hospitalizations, ICU admissions and seroprevalence surveys. One issue
surrounding our model's use during the COVID-19 pandemic is the confounded
nature of NPIs and mobility. We use our framework to explore this issue. We
have open sourced an R package epidemia implementing our approach in Stan.
Versions of the model are used by New York State, Tennessee and Scotland to
estimate the current situation and make policy decisions.
