RATS 11
RATS 11

<Root level>

SEIR Model

Home Page

← Previous Next →

This includes a PDF with detailed descriptions of RATS programs for simulation and estimation of various forms of the commonly used SEIR (Susceptible Exposed Infected Recovered) dynamic model for infections, applied to COVID data.

 

This has a series of (increasingly complicated) linear and non-linear dynamic models. There are actually quite a few interesting parallels with dynamic models for economic data:

What the model really wants for data is often unobservable. (Instead of the unobservable "real rate of interest", the SEIR model lacks "number of people who are infectious.")

Key parameters are poorly estimated from time series data.

As with micro-level economic data (or data in countries with less developed statistics bureaus), what data can be observed may have some odd properties.

 

Because of those similarities, the methods employed may have parallels to economic analysis.

 

The first chapter works only with pure simulations. It first shows a deterministic model, a model with errors implied by the process and another deterministic model with an assumed model of changing behavior. In the simulation section, it shows a "shotgun" graph which shows various random simulations of the model and (in this case) demonstrates that a wide range of values is mainly due to differences in timing rather than actually differences in the ultimate effect. (Shotgun graphs have become increasingly popular in the VAR literature for showing impulse responses.)

 

The second chapter looks at the behavior of actual data (in this case from the state of Illinois in the U.S.). U.S. data has some rather strong day-of-the-week effects (which often differ from state to state); this looks at different ways to extract the signal out of observed data.

 

The third chapter looks at actually estimating a dynamic SEIR model given the data. This does four increasingly complex models: first with a transmission rate which is fixed across the sample; the second with an exogenously input change in the transmission rate, the third with an endogenously determined transmission rate, then finally a more complicated model that allows for a multiplicative day-of-the-week effect in the observed data.

 

The SEIR model is fundamentally non-linear, though not in a particularly complex way. The basic simulation models can be handled relatively easily with FORECAST or SIMULATE instructions. When attempting to fit them to actual data, however, one needs to use the non-linear (extended) Kalman filter to deal with multiplicative interactions among the states. The non-linear Kalman filter is covered in greater detail as part of the State Space Models/DSGE e-course.

 

Preface

1 Simulation Models

1.1 The SEIR Model

1.2 SEIR With Errors

1.3 With (Deterministic) Time-Varying beta

Example 1.1 Fixed beta, No Errors

Example 1.2 Fixed beta, With Errors

Example 1.3 Varying beta, No Errors

2 Dealing with Data

2.1 Day of the Week Cycles with Exponential Smoothing

2.2 Multiplicative State-Space Model

Example 2.1 Weekly Cycles by Smoothing

Example 2.2 Weekly Cycles by Unobserved Components

3 SEIR Model for Estimation

3.1 With Fixed Beta

3.2 With Deterministic Time-Varying Beta

3.3 With Endogenous Beta

3.4 With Endogenous Beta and Day-of-Week Effects

Example 3.1 State-Space Model with Fixed Beta

Example 3.2 State-Space Model with Deterministic Time-Varying Beta

Example 3.3 State-Space Model with Endogenous Time-Varying Beta

Example 3.4 Model with Endogenous Beta and Day-of-Week Effects

 


Copyright © 2025 Thomas A. Doan