Hazhir Rahmandad 2004

Download Report

Transcript Hazhir Rahmandad 2004

Dynamics of Contagion:
Comparing Agent-Based and
Differential Equation Models
Hazhir Rahmandad and John Sterman
MIT-Albany Colloquium
April 30, 2004
11/3/200
1
Motivation
• Agent Based (AB) models are widespread: e.g.
Santa Fe, Wolfram’s A New Kind of Science
• Many exciting applications, but lots of hype, not
enough understanding of when AB adds value and
when it is inappropriate
• Question is not ‘which type of model is right?’:
All models are wrong.
• Question is
– Which type of model is best suited for different purposes?
– How robust are policy conclusions to modeling methods?
– How can best attributes of both modeling paradigms be
integrated?
11/3/200
2
DE vs. AB: What are the differences?
• Differences in typical assumptions:
– Level of aggregation of similar elements
• Treatment of Time
– Continuous (solved numerically, results (should be)
insensitive to time step or numerical integration
method)
– Discrete (time periods often undefined, can’t easily be
varied)
• Differences in typical practice
– Modeling problems vs. modeling systems
– Emphasis on stochastic elements
– Software and representation
11/3/200
3
SEIR Epidemic Model: DE version
Susceptible
Population S
Emergence
Rate ER
Infection
Rate IR
B
Depletion
Infectious
Population I
Exposed
Population E
-
+
+
Total
Infectious
Contacts
C
+
Infectivity of
Exposed
Average
Incubation
Time e
Contagion
Total
Population
N
Contact Rate
for Exposed
R
+
Recovery
Rate RR
-
-
+
+
+
Recovered
Population R
R
Average
Duration of
Illness d
Contagion
+
+
+
Contact Rate
for Infectious
Infectivity of
Infectious
dS = – IR, dE = IR – ER, dI = ER – RR, dR = RR
dt
dt
dt
dt
IR = C(S/N)
ER = E/e
C = cEiEE + cIiII
RR = I/d
11/3/200
4
Translating SEIR into AB
<TIME STEP>
Susceptible S
Exposed E
Symptomatic I
Emergence
Rate ER
Infection Rate IR
+
B
Total Infectious
Contacts TIC
Depletion
+
R Contacts Rn
<TIME STEP>
Infectious
Contacts C
R
R
Contagion
Contagion
Infectivity of
Infectious IIS
Infection Risk IP
Contact Probability
Network CP
Contact Frequency
for Healthy Cs
Tendency to Use Links
for Individual TUL
<Recovered R>
Link Contact
Rate LCR
Contact
Network NW
Infectivity of
Exposed IES
Observed Link
Per Person K
Eff Link Num on
Contact Coeficient a
Relative Contact
Risk for Infectious
RCI
<Exposed E>
<No
<Susceptible S>
Contact Risk
CR
<Relative Contact
Risk for Exposed
RCE>
Relative Contact for
Recovered RCR
C[J,k]=IF(S[J]*CP[J,K]*IP[K], CR[J,K]>Rn[J,K],1,0) CP[J,K]=LCR[J,K]*DT
IP[J]= E[J]*IES+I[J]*IIS
CR[K]=S[K]+CE/CS*E[K]+CI/CS*I[K]+CR/CS*R[K]
LCR[J,K]=f(NW[J,K], CS, K, a, TUL[J]*TUL[K])
11/3/200
5
AB SEIR Overview
-
Average
Incubation Time e
Initial
Exposed E
<One Day>
Probability of
Emergence
<TIME STEP>
<TIME STEP>
+
Susceptible S
+
Exposed E
Infection
Rate IR
+
+
Depletion
B
Contagion
R Contacts Rn
+ ++
+
One Day
Contact Probability
Network
Total Relative
Contact for Links
TCL
-
Expected
Duration of Illness
d
<TIME STEP>
Infectivity of
Exposed IES
<Exposed E>
<Noise Seed>
<Susceptible
S>
Contact Risk
CR
<TIME STEP>
Link Contact
Rate LCR
Probability of
Recovery
R Recovery
Contagion
Infection
Risk IP
Infectious
+ Contacts C
<Recovered
R>
Relative Contact
Risk for Infectious
RCI
<Relative Contact
Risk for Exposed
RCE>
Relative Contact for
Recovered RCR
Contact Frequency
for Healthy AC
Effect of Link Number
on Contact Rate ELN
<Observed Link
Per Person>
Depletion
<Noise Seed>
R
Noise Seed
Effective
Individual Contact
Rate
<Contact
Network NW>
B
+
R Emergence
Total Infectious
Contacts TIC
Infectivity of
Infectious IIS
<Symptomatic
I>
Expected
Contact per DT
Recovered R
Recovery
Rate RR
R
Depletion
<Exposed E>
Symptomatic I
Emergence
Rate ER
B
Eff Link Num on
Contact Coeficient
Tendency to Use
Links for Individual
TUL
<Noise Seed>
<Total Observed
Number of Links>
Switch Indiv
Heterogeneity
• # of States: N*4 vs. 4,
– N=200: Total # of variables and parameters: over 300000 vs. 35
11/3/200
6
Experimental Design
• AB SEIR Settings: 10 combinations (5*2)
– Network Structure
• Uniform, Random, Scale-Free, Small-world, Lattice
– Heterogeneity
• Low and High
• N=200
• Simulating each setting 1000 times
• Comparing with Base DE and Calibrated DE on
3 measures of Diffusion Fraction (F), Peak Time
(TP) and Peak Value (IMAX)
11/3/200
7
Networks: Random & Uniform
• Uniform: Everybody is connected to
everybody else
• Random: There is a random network
structure (same chance for all possible
links)
11/3/200
8
Networks: Scale Free
• The number of links has a power law distribution
– A few hubs with lots of links and a lot of poorly connected
individuals
Logaritmic Graph of Number of Links per Node
1
1
10
100
1000
Observed Probablity of Link
0.1
0.01
0.001
0.0001
0.00001
Number of Links
11/3/200
9
Networks: Small-world & Lattice
• Small world, with k expected links:
– Expected links to neighbors with distance up to k/2: k*p
• Connected to k/2-far neighbors with probability p
– Expected long distance links: k*(1-p)
• Connected to others with k*(1-p)/(N-k)
• Lattice: No long distance link
11/3/200
10
Heterogeneity
TUL[ J ] * TUL[ K ]
• Contact Rate[J,K]=L *
( N [ J ] * N [ K ])
• Low
– More link for individual (N) =>Proportionally less
contact per link (α=1)
– Fixed individual tendencies to use links (TUL[J]=1)
• High
– Contact per link independent of individual
connectivity (α=0)
– Uniform distribution of TUL ~U(0.25-1.75)
11/3/200
11
Calibration
• Optimized DE is more realistic than base DE
• Best fitting DE model matching MEAN
Infected in AB simulation
• Optimize over
– Infectivity of Exposed and Infectious (0<CE,CI)
– Average Incubation Time (0<ε<30)
– Average Duration of Illness (5<δ<30)
11/3/200
12
A typical simulation
Populations
Susceptible
Recovered
200
150
Exposed
S0
Infectious
50
F=( S0-S∞)/ S0
S0-S∞
100
Imax
0
0
30
Tp
11/3/200
60
90
120
150
180
210
240
270
300
Time (Day)
13
Overview: Uniform & Random
11/3/200
14
Overview: Scale-Free and Small-world
11/3/200
15
Overview: Lattice
11/3/200
16
Results: Diffusion Fraction
11/3/200
17
Results: Peak Time & Peak Value
11/3/200
18
Results: Calibration Insights
• Very good fit: 0.97<R2<1.00
• Calibrated parameters absorb networks and heterogeneity effects
11/3/200
19
Results Summary
• Effect of Network small except lattice
– Some Numerical, Little Behavioral Sensitivity
– Clustering increases AB-DE gap
– Network size decrease AB-DE gap
– No gap with calibrated DE
• Effect of heterogeneity small
– Extreme: Disintegration into social and hermit
(Scale-Free shows best)
– The AIDS example
11/3/200
20
AB vs. DE: Other Considerations
• Data Availability
• Extra Levers in AB Models
• Complexity vs. Analyzability
– Simulation Cost
– Limits to Understanding
• Purpose of Modeling and Cost of Error
• More Feedback vs. Disaggregation
11/3/200
21
Conclusions: Upsides of AB vs. DE
• AB models offer additional insights when:
– Sparse and locally connected networks
– Capture “Non/low Diffusion” modes of
behavior (important when low “contact
number” (c*i*d) for epidemic)
– Better tackle questions about effect of
individual differences on overall behavior
– Possibility of misleading parameter values in
fitting curves to DE models
11/3/200
22
Conclusions: Downsides of AB vs. DE
• Data are rarely available to the detail
needed for an AB model
• Marginal precision improvement on
complexity is usually low, expanding the
boundaries may pay back better.
• Analysis is very hard:
– Structure-behavior connection hard to explain
– Simulation cost can get prohibitive fast
– Hard to make sense of so much data
11/3/200
23
Process Insights
• It is possible to build agent based models
keeping up with good SD practice guidelines
– Dimensional consistency
– Independence from DT
• Vensim software needs improvement to be
used for AB models
• Dealing with stochastic elements is not trivial!
11/3/200
24
11/3/200
25
Agenda
• AB and DE Models
• SEIR Model: DE and AB
• Study Design:
– Networks, Heterogeneity, and Calibration
• Results
– Overview, Three Metrics
• Other Considerations
• Conclusions and Lessons
11/3/200
26
Policy recommendations might
be affected by model type.
• Example: Reducing risk of smallpox
bioterror attack: What is the right
vaccination strategy?
– Kaplan, Craft & Wein (2002) use a differential
equation model; conclude Mass Vaccination is
superior
– Halloran et al. (2002) use agent model,
conclude Targeted Vaccination is superior
• What accounts for difference? AB vs. DE
method, or other assumptions?
11/3/200
27
AB vs. DE: A continuum, not an opposition
Example: modeling world population
Highly
aggregated
Single stock
Disaggregated by age
Typical DE models
Disaggregated by region, age
Disaggregated by country, age, gender, etc.
…
Each person represented
Typical AB model
People disaggregated into organs
Organs disaggregated into cells
…
Highly
disaggregated
Atoms
Agent model still
aggregates lowerlevel entities
Quarks
11/3/200
28
Goals
• What are the differences between AB and
DE methods? When might it matter?
• Modeling discipline: Learning across
boundaries
– Challenges of crossing the boundary
– Learning opportunities for both communities
• Example: The diffusion of an epidemic
– AB: Value added under what conditions?
– DE: What might it miss?
11/3/200
29
Nonlinear differential equation paradigm:
dx/dt = f(x,u)
x vector of states; u, vector of exogenous inputs, including
stochastic shocks; f() typically nonlinear
Typically in continuous time but difference equations
also common
Finite number of compartments (elements of x)
No heterogeneity within a compartment. Heterogeneity
added by enlarging number of compartments, e.g.:
Disaggregation by spatial structure:
World population P becomes population by country Pi
Disaggregation by attribute
People P become Pijk…, where, e.g., i, j, k = sex, age,
health status, behavior, etc.).
11/3/200
30
Example: SEIR Epidemic Model
Susceptible
Population S
Emergence
Rate ER
Infection
Rate IR
B
Depletion
Infectious
Population I
Exposed
Population E
-
+
+
Total
Infectious
Contacts
C
+
Infectivity of
Exposed
R
ER = E/e
RR = I/d
11/3/200
Average
Duration of
Illness d
Contagion
+
+
+
Contact Rate
for Infectious
Infectivity of
Infectious
dS = – IR, dE = IR – ER, dI = ER – RR, dR = RR
dt
dt
dt
dt
IR = C(S/N)
C = cEiEE + cIiII
-
+
Average
Incubation
Time e
Contagion
Total
Population
N
Contact Rate
for Exposed
R
+
Recovery
Rate RR
-
+
+
Recovered
Population R
4 compartments (S, E, I, R)
Perfect mixing within
compartments
No heterogeneity in infectivity
(within E, I) or in network
structure of social contacts
31
Agent-based paradigm:
• Set A = {a1, … an} of agents, each agent has states xa
• x can be e.g. health status, location, wealth, beliefs,
decision rules, etc.
• States xa change according to rules of interaction, e.g.,
•
Nearest neighbor (on lattice, torus, etc.) or other network
structure;
•
Stochastic or deterministic.
• Discrete time: xa(t) = Rule[xa(t-1)] for all a in {A}]
• Heterogeneity across agents. Often, distribution of states
across agents (often assigned randomly)
• Aggregation:
•
Population is sum of agents; Number of people in each
category (e.g., health status, gender) is sum of agents with
those attributes each period.
11/3/200
32
Example: Agent-Based Epidemic Model
• Each person in one of 4
states (S, E, I, R)
• Each person interacts
(deterministically or
stochastically) according to a
specified network structure
of social contacts (e.g.,
some people highly, others
weakly, connected)
• Probability of infection given
contact can differ for each
person (heterogeneous
attributes of each agent)
• Discrete time
Example Decision Rules:
If S, then become E if any of your contacts
this period are in E or I state and if those
contacts result in infection
If E, then become I e days after exposure
11/3/200
33
Example: SARS
Cumulative Probable Cases, Taiwan
11/3/200
34
SARS: Reported Cases, Taiwan
11/3/200
35
SARS: Geographical Dist.
11/3/200
36
Crossing Boundaries: A Simple Model
Symptomatic I
Recovered R
+
Symptomatic
Recovery
- +
Recovery Rate
RR
+
One Day
+
Probability of
Recovery
R Recovery
<Expected
Duration of
Illness d>
Noise Seed
<TIME STEP>
Expected
Duration of
Illness d
DE Model
SD
Model
• Recovery= S/d
Agent Based Model
• Probability of Recovery= 1-(1-1/d)^One Day/TIME STEP
• Symptomatic(t)=E( SymptomaticI i (t ) )

i
• Learning Lessons: Unit Consistency and Independence from TIME STEP
11/3/200
37