  A study of changes in the transmission of a disease, in particular, a new
disease like COVID-19, requires very flexible models which can capture, among
others, the effects of non-pharmacological and pharmacological measures,
changes in population behaviour and random events. In this work, we give
priority to data-driven approaches and choose to avoid a priori and ad-hoc
methods. We introduce a generalised family of epidemiologically informed
mechanistic models, guided by Ordinary Differential Equations and embedded in a
probabilistic model. The mechanistic models SIKR and SEMIKR with K Infectious
and M Exposed sub-compartments (resulting in non-exponential infectious and
exposed periods) are enriched with a time-dependent transmission rate,
parametrized using Bayesian P-splines. This enables an extensive flexibility in
the transmission dynamics, with no ad-hoc intervention, while maintaining good
differentiability properties. Our probabilistic model relies on the solutions
of the mechanistic model and benefits from access to the information about
under-reporting of new infected cases, a crucial property when studying
diseases with a large fraction of asymptomatic infections. Such a model can be
efficiently differentiated, which facilitates the use of Hamiltonian Monte
Carlo for sampling from the posterior distribution of the model parameters. The
features and advantages of the proposed approach are demonstrated through
comparison with state-of-the-art methods using a synthetic dataset.
Furthermore, we successfully apply our methodology to the study of the
transmission dynamics of COVID-19 in the Basque Country (Spain) for almost a
year, from mid February 2020 to the end of January 2021.
