This blog piece intends to introduce two new add-ins (i.e. SEIRMODEL and TSEPIGROWTH) to EViews users’ toolbox and help close the gap between epidemiological models and time series methods from a practitioner’s point of view.
Table of Contents
- Introduction
- Susceptible-Exposed-Infected-Recovered (SEIR) model
- Observational Models
- Application to COVID-19 Data from Turkey
- Files
- References
Introduction
Spread of infectious diseases are usually described through compartmental models in mathematical epidemiology instead of observational time series models since analytical derivation of their dynamics are quite straightforward. These are merely structural models that divide the population into several states and then define the equations that govern the transition behavior from one state to another. In other words, state space models.Susceptible-Exposed-Infected-Recovered (SEIR) model
I have written an add-in (SEIRMODEL) for interested EViews users, who would want to carry out their own analyses and gain basic insights into the systemic nature of an epidemic. The add-in implements a deterministic version of the SEIR model, which does not take into account vital dynamics like birth and death. Still, it offers a simplified framework for those who are not familiar with these concepts.In order to run simulations, users need to provide required inputs (e.g. population size, calibration parameters, initial conditions etc.), details of which can be found in the documentation file that comes with the add-in:
|
|
|
|
Observational Models
Structural modelling of epidemics becomes increasingly complex when the heterogeneity in the population, mobility issues, interactions, etc. are considered in the computations. Functions fitted to observed data for calibration purposes are mostly nonlinear, which can further complicate the estimation process. Harvey and Kuttman (2020) recently proposed useful observational time series methods particularly for generalized logistic and Gompertz growth curves. I have written an add-in (TSEPIGROWTH) that implements those methods outlined in the paper.Suppose we wanted to fit these nonlinear curves to the number of infected individuals from the simulation of our earlier SEIR model:
|
|
|
|
If we wanted to take the other venue offered by Harvey and Kuttman (2020) and estimate these parameters via observational methods, then we could simply run the add-in:
|
|
|
|
|
|
Application to COVID-19 Data From Turkey
Examples above may be important or useful from a pedagogical point of view, but we need to try these models on actual data to gain more insight from a practical perspective. Naturally, COVID-19 data would be the most recent and most appropriate place to start. Users can visit the previous blog post to learn how to fetch COVID-19 data from various sources. Here, I’ll use another data source provided by the WHO.First, we fit a Gompertz curve to the level and make forecasts until the end of year. Next, we do the same exercise with the observational counterparts of the Gompertz model that focus on estimation of the growth rate.
The chart below visually compares the fitted values of growth:
|
|
|
|
|
|
|
|
Thanks for your professional analysis and charts.
ReplyDeletePolicy intervention options not working, there seems to be some issue with the command like : tsepigrowth(ser="total_cases", growth="1", model="2", sample="3/12/2020 12/31/2020", policy="6/1/2020 7/12/2020") 'for Gompertz with slope intervention
ReplyDeleteIt seems to work fine. You can see the built model in the workfile. There has to be a variable named "policy" in the workfile as well and c(3) is the estimated impact.
ReplyDelete