icpsr - complex systems models in the social sciences - bonus content - professor daniel martin katz...

28
Computational models of infectious disease transmission Jon Zelner Postdoctoral Fellow, Ecology & Evolutionary Biology @ Princeton University Postdoctoral Fellow, NIH Fogarty International Center Research and Policy for Infectious Disease Dynamics (RAPIDD) Program

Upload: daniel-martin-katz

Post on 14-Dec-2014

217 views

Category:

Technology


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Computational models of infectious disease transmissionJon Zelner Postdoctoral Fellow, Ecology & Evolutionary Biology @ Princeton University

Postdoctoral Fellow, NIH Fogarty International Center Research and Policy for Infectious Disease Dynamics (RAPIDD) Program

Page 2: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

ObjectivesDissect an important, classic model.

Understand strengths and limitations of the classical model.

Look at alternative implementations and applications to different problem domains.

Page 3: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Why model infectious disease (ID) transmission?A wide variety of IDs cause significant

Morbidity: norovirus, seasonal influenza

Mortality: HIV, pandemic influenza

ID transmission is often multi-level but datasets typically only capture one level at a time.

e.g., households vs. community

Want to relate characteristics of pathogens to quantitative descriptions of their dynamics.

Page 4: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Classical SIR Model

Example of a state-space model

Individuals occupy one three states at any given time:

Susceptible: Susceptible individuals are not infected and may become infected upon exposure to an infected individual.

Infectious: Infectious individuals are currently ill and may infect susceptibles, with rate b. Infectious individuals recover with average rate g.

Recovered/Immune: Recovered individuals are no longer infectious and are considered to be permanently immune, that is, they cannot be re-infected.

S I RbI g

Page 5: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

SIR Model: AssumptionsIn the classical SIR model, all individuals are assumed to be in contact with all others.

Population assumed to be infinite.

Individuals subject to spontaneous recovery with probability g on every step.

dSdt

= −bSI

dIdt

= bSI − gI

dRdt

= gI

!

Page 6: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

SIR Model: Predictions Ro is the basic reproductive number

Expected # of new cases generated by a single infectious individual.

In basic SIR model, Ro = b / g

If Ro >= 1: We should expect to see outbreaks

If Ro < 1: Expect to see fade-out.

Can use this quantity to make predictions about outbreak dynamics and intervention.

Page 7: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

SIR Model w/Vital DynamicsHere, we add simple birth and death.

Individuals are born and die at rate mu, so the population size is constant.

Ro = b / (g+mu)

Page 8: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

SIR Model: Vaccination of Newborns

P is proportion of newborns vaccinated at birth.

Model implies that if:

Ro(1-P) < 1, vaccination is effective

P>= P* = 1 - (1/Ro)

Page 9: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Deterministic models approximate stochastic outbreak dynamics

Random variability is actually the major concept behind deterministic outbreak models.

Epidemic curve in standard SIR model is the expected mean epidemic trajectory, given b & g.

Deviations from this trajectory are assumed to be:

Caused by small, random shocks.

Uncorrelated in time, so that a random event at t is independent of one at t+dt.

Page 10: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Stochastic SIR Model Demo

CODE EXAMPLES AVAILABLE AT:HTTP://GITHUB.COM/JZELNER/ICPSR-2010/

Page 11: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Stochastic SIR Model Demo

HTTP://GITHUB.COM/JZELNER/ICPSR-2010/BLOB/MASTER/SIMPLESIR.PY

SPECIFIC EXAMPLE AVAILABLE AT:

NOTE: THIS MODEL IS IMPLEMENTED IN THE OBJECT ORIENTED

PROGRAMMING LANGUAGE PYTHON

Page 12: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Modeling transitions from between emotional states: discontent, neutral, content.

Individuals in neutral state are analogous to susceptibles and can become either content or discontent.

Additional parameter: a, random probability per unit of time that ego will change state from neutral to content or discontent.

Modeling the diffusion of emotions: SISa Model (Hill et al.)

Page 13: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Modeling the diffusion of emotions: SISa Model (Hill et al.)

Model was fit to Framingham Heart Study panel data.

Transitions between states are assumed to happen slowly (in units of years).

Fit to Framingham data using a linear regression model:

Y = 1 if alter transitions from neutral to content from t -> t+1.

Ego’s state is only predictor, a is model intercept.

Page 14: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

SIR outbreak model in Netlogo

This model adds a spatial component.

As the number of individuals in the world increases, the rate of contact between them also increases.

Page 15: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

SIR outbreak model in Netlogo

Download the Model from the course website:

http://computationallegalstudies.com/icpsr-class

File is Called “SIR Example Netlogo Model”

Page 16: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

SIR outbreak model in Netlogo

Model Contains Commented Out Code that Can Be Turned on by Removing the ;;

Cannot have both Versions of ‘To Recover’ at once so you will have to choose

OFF ON

OFFON

Page 17: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Model Setup

This is what happens when you click setup.

Values are loaded into turtles and the world.

Page 18: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

When you click ‘Go’:Move: Turtles spin into a randomly chosen direction and then move one step in that direction.

Infect: Turtles take a look at the other individuals on the patch they occupy after moving, see if any are susceptible turtles are there, and try to infect them if they are.

Recover: Infectious turtles check if they’ll be recovering on this tick, and if so, they switch their state from infectious to recovered/immune and can no longer infect anyone.

Update Turtles: This is our first bookkeeping operation: we’ll take a look and see if any of each turtle’s variables - e.g., how long the turtle has been sick for - needs updating, and if so, do it.

Page 19: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

When you click ‘Go’:Update Global Variables: Updating the state of variables that impact the whole turtle world.

I.e., # of individuals who are currently susceptible, infectious and immune (these show up in the plot on the bottom-left corner of the display).

Tick! We advance the time forward one step - it’s very important to remember to call this or else nothing will ever happen in the model.

Update plot: Finally, we update the plot on the bottom-left corner, which tracks the number of individuals currently in each state, to reflect the changes over the last step.

Page 20: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Infect and recovery procedures

Page 21: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

What happens in this model?Predictions from standard SIR model don’t hold, because contact structure is different.

But that’s kind of the point.

Analysis of this model is potentially more difficult because we’ve relaxed assumptions about contact.

Page 22: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

What’s wrong with this picture?

Page 23: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Writing more efficient codeGive turtles a memory slot for how long they’ll be infectious if infected.

When infected, store the duration.

Turtles count how long they’ve been sick for and change state when they reach the limit.

Page 24: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Writing more efficient codeWalk Through the Netlogo Timing Tutorial

http://computationallegalstudies.com/icpsr-class/

Page 25: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Alternate modelsWhat if individuals don’t recover spontaneously, but go through a series of recovery sub-stages?

S bSI RI1 I2 I3 I4

g*4

This yields gamma-distributed recovery times.

More stages = lower variance in recovery periods

Page 26: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Gamma-distributed recovery times

Page 27: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

Alternate models of recovery

Assume that recovery is a function of small, multiplicative effects, yielding a lognormal distribution of recovery periods.

Page 28: ICPSR - Complex Systems Models in the Social Sciences - Bonus Content - Professor Daniel Martin Katz (Guest: Jon Zelner)

More extensions

More states

Incubation

Asymptomatic infection

Contact networks

Dynamic networks (!!)