SEIR Simulation/Estimation Models

Use this forum for posting example programs or short bits of sample code.

SEIR Simulation/Estimation Models

Unread postby TomDoan » Tue Dec 15, 2020 3:12 pm

This is a zip which includes RATS programs for simulation and estimation of various forms of the commonly used SEIR model for infections.

seir_programs.zip
Zip with programs/data/technical details
(1015.95 KiB) Downloaded 574 times
SEIR.pdf
Technical details
(992.46 KiB) Downloaded 599 times


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.
TomDoan
 
Posts: 7388
Joined: Wed Nov 01, 2006 5:36 pm

Re: SEIR Simulation/Estimation Models

Unread postby prashantj » Tue Dec 15, 2020 10:31 pm

That is amazing Tom. Wow! so impressive to find how accurate the model does the job of forecasting! Thanks for sharing! Interesting read! What is the source of Illinois state data? Same source as US data?
Prashant
prashantj
 
Posts: 88
Joined: Sun Apr 11, 2010 2:56 am

Re: SEIR Simulation/Estimation Models

Unread postby TomDoan » Tue Dec 15, 2020 11:06 pm

The Illinois Department of Public Health keeps a file updated. (It has county level data in it as well). The link is in the PDF file.
TomDoan
 
Posts: 7388
Joined: Wed Nov 01, 2006 5:36 pm

Re: SEIR Simulation/Estimation Models

Unread postby prashantj » Sat Apr 22, 2023 10:38 am

Oh! I see! I will try to learn and apply with my state.


Last bumped by TomDoan on Sat Apr 22, 2023 10:38 am.
prashantj
 
Posts: 88
Joined: Sun Apr 11, 2010 2:56 am


Return to Examples and Sample Code

Who is online

Users browsing this forum: No registered users and 2 guests

cron