an introduction to stochastic...
TRANSCRIPT
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
An Introduction to Stochastic Modeling
Dr. Doreen De Leon
CURM Research Group, Fall 2014
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Outline1 An Introduction to Stochastic Modeling2 Individual-Based Models (Method 1)
Principles of Method 1Calculate Risk of Infection in Each Time StepInterpreting Findings from Stochastic Models
3 Discrrete-Time Stochastic Compartmental Models (Method 2)Overview of Method 2Calculating the Distribution of Susceptibles Infected During aTime Step
4 Extensions to Methods 1 and 25 Continuous Time (“Time to Next Event”) Compartmental Models
(Method 3)6 Choosing the Best Approach7 Insights and Applications of Stochastic Models
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Introduction to Stochastic Modeling
Deterministic models do not accurately represent disease in asmall population.Three major types of stochastic models:
1 Individual-based models (Method 1)2 Discrete-time compartmental models (Method 2)3 Continuous time (or “time to next event") compartmental models
(Method 3).
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Three Methods of Stochastic Modeling
Individual-based models (Method 1): track what happens to eachindividual in a population and allows chance to determinewhether s/he becomes infectious or infected at each time step.
Discrete-time compartmental models (Method 2): treatsusceptibles as one compartment and lets chance determinenumber infected by infectious from the previous generation.Continuous time (or “time to next event") models (Method 3)
Susceptibles comprise one compartment.Chance determines when next event (i.e., infection of a person orrecovery of an infected person) occurs.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Three Methods of Stochastic Modeling
Individual-based models (Method 1): track what happens to eachindividual in a population and allows chance to determinewhether s/he becomes infectious or infected at each time step.
Discrete-time compartmental models (Method 2): treatsusceptibles as one compartment and lets chance determinenumber infected by infectious from the previous generation.Continuous time (or “time to next event") models (Method 3)
Susceptibles comprise one compartment.Chance determines when next event (i.e., infection of a person orrecovery of an infected person) occurs.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Three Methods of Stochastic Modeling
Individual-based models (Method 1): track what happens to eachindividual in a population and allows chance to determinewhether s/he becomes infectious or infected at each time step.
Discrete-time compartmental models (Method 2): treatsusceptibles as one compartment and lets chance determinenumber infected by infectious from the previous generation.Continuous time (or “time to next event") models (Method 3)
Susceptibles comprise one compartment.Chance determines when next event (i.e., infection of a person orrecovery of an infected person) occurs.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Principles of Method 1Calculate Risk of Infection in Each Time StepInterpreting Findings from Stochastic Models
Principles of Method 1
Most computer intensive (equation for each individual).
Mathematically: draw number at random and specify range ofvalues for individual to become infected; range based on risk ofinfection at that time point.Example: risk of infection = 35%
Draw random number 0 ≤ n ≤ 1Set 0 ≤ n ≤ 0.35→ infected, n > 0.35→ stay susceptible.To compute outbreak size
Draw random number for each susceptible person.Update susceptibles and infectious based on number drawn.Repeat until no more infectious and transmission ceases.
Time step size is one serial interval.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Principles of Method 1Calculate Risk of Infection in Each Time StepInterpreting Findings from Stochastic Models
Steps for Method 1
Method1 Calculate risk λi,t that the ith susceptible, 1 ≤ i ≤ N, becomes
infected in next time interval.2 Draw random number between 0 and 1 for each susceptible.3 a If random number for individual i is less than λi,t, individual i
becomes infected, and thus, infectious by time t + 1; otherwise,individual i remains susceptible.
b Any infectious at previous time step now immune.4 Total number of infectious at time t + 1 is It+1.5 If It+1 = 0, transmission stops and the size of outbreak found by
summing infectious for time 1 ≤ t ≤ T; otherwise, go to Step 1.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Principles of Method 1Calculate Risk of Infection in Each Time StepInterpreting Findings from Stochastic Models
The Reed-Frost Equation
The equation λt = βIt overstimates risk of infection in smallpopulation.The Reed-Frost formula (dates to 1920’s)
λt = 1− (1− p)It , (1)
where p = probability of an effective contact between twospecific individuals in each time step.Assume infection risk same for all: λi,t = λt, for 1 ≤ i ≤ N.Derivation
Probability of coming into contact with at least one infectiousindividual:
1− (probabability of avoiding contact with all infectious).
Probability of avoiding contact with all infectious = (1− p)It .Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Principles of Method 1Calculate Risk of Infection in Each Time StepInterpreting Findings from Stochastic Models
The Reed-Frost Equation
The equation λt = βIt overstimates risk of infection in smallpopulation.The Reed-Frost formula (dates to 1920’s)
λt = 1− (1− p)It , (1)
where p = probability of an effective contact between twospecific individuals in each time step.Assume infection risk same for all: λi,t = λt, for 1 ≤ i ≤ N.Derivation
Probability of coming into contact with at least one infectiousindividual:
1− (probabability of avoiding contact with all infectious).
Probability of avoiding contact with all infectious = (1− p)It .Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Principles of Method 1Calculate Risk of Infection in Each Time StepInterpreting Findings from Stochastic Models
Extending Reed-Frost
Can be extended to describe risk of infection from contacts withdifferent subgroups of a population.
Ex.: home, community, work
λi = 1− (1− ph)Ih,t(1− pc)
Ic,t(1− pw)Iw,t.
Problem: Values of ph, pc, pw not always easily available.
Can use estimates based on fitting statistical data to find requisiteprobabilities.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Principles of Method 1Calculate Risk of Infection in Each Time StepInterpreting Findings from Stochastic Models
Interpreting Findings from Stochastic Models
Due to use of drawn random numbers, different runnings ofsimulations usually give different outbreak sizes.Usually do the following:
Run simulations multiple times, pooling results to obtain adistribution of the outcome of interest.Summarize results in analogous way to any epidemiologicalstudy, e.g., show average outcome and 95% range in whichoutcomes occurred.Number of runs sufficiently large until further simulations haveno (or negligible) effect on resulting distribution.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Overview of Method 2Calculating the Distribution of Susceptibles Infected During a Time Step
Discrete-Time Stochastic Compartmental Models (Method2)
Idea: Allow chance to determine number of secondary cases resultingfrom each generation of cases.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Overview of Method 2Calculating the Distribution of Susceptibles Infected During a Time Step
Overview of Method 2
Slightly less computer-intensive than Method 1.
Keeps track of total number infectious and susceptible at eachstep.
Random numbers used to determine total number of susceptiblesinfected by the infectious in each generation.
Assumption: This number follows some distribution.
Same steps as Method 1, except use distribution of number ofindeviduals likely to be infected to determine how manyindividuals infected in next step.
Note: time step size is one serial interval.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Overview of Method 2Calculating the Distribution of Susceptibles Infected During a Time Step
Summary of Method 2
Method1 Calculate risk of infection in next time interval using (1).2 Calculate distribution of number of susceptible likelty to be
infected by infectious present at time t.3 Sample random number 0 ≤ ni ≤ 1 from distribution calculated
in Step 2 to determine ki, number susceptible who are infected.Then
It+1 = ki and St+1 = St − ki.
4 If It+1 = 0, transmission ceases and size of outbreak given bysumming It for t = 1, 2, . . . , t; otherwise, return to Step 1.
Note: subscript i in ni, ki denotes process of infection.Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Overview of Method 2Calculating the Distribution of Susceptibles Infected During a Time Step
Calculating the Distribution of Susceptibles Infected Duringa Given Time Step
The probability that ki out of St individuals will be infected in the nexttime step is given by the standard binomial expression for theprobability of ki successes out of St trials:(
St
ki
)λki
t (1− λt)St−ki .
Note: This corrects a type-o on p. 163 in Equation 6.6.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Extensions to Methods 1 and 2
Methods 1 and 2 can be adaptated to include other transitions, e.g.
let chance to determine number that recover and becomeimmune;
allow time steps of less than one serial inteval (e.g., of size δt).
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Example (Method 2)
Number who recover between time t and t + δt, for δt small,calculated using analogous method to that used in Method 2.Random number in the range 0 to 1 sampled from binomialdistribution, used to determine kr (number infectious to recoverin that time interval).
P(kr out of It infectious recover) =(
It
kr
)rkr
t (1− rt)It−kr ,
where rt = risk of individual recovering between t and t + δt.For most practical problems, δt is small and
rt ≈ (rate individuals recover) · δt.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Modified Method 2
Method1 a Calculate λt = 1− (1− p)It (risk of infection).
b Calculate proportion infected that should recover, rt = rδt.2 a Calculate distribution of number susceptible likely to be infected
by infectious individuals present at time t.b Calculate distribution of number infectious who should recover in
next time step.3 a Draw random number 0 ≤ ni ≤ 1 from distribution in Step 2a to
determine ki (number susceptible who are infected and becomeinfectious in next time step).
b Draw random number 0 ≤ nr ≤ 1 from distribution in Step 2b todetermine kr (number infectious who recover in next time step).
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Modified Method 2 (cont.)
Method (cont.)4 It+δt = It + ki − kr, St+δt = St − ki.5 If It+δt = 0, transmission stops; otherwise, return to Step 1.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Method 3 Compared to Methods 1 and 2
Methods 1 and 2 are discrete stochastic models.
Method 3 uses chance to determine when the next event occurs(i.e., size of δt) and the type of transition that occurs.
Method 3: Stochastic implementation of differential equations.
Method 3: Usually implemented using a programming language.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Summary of Method 3
Method1 Calculate rate (Mt) at which individuals change their current
state (i.e., become infected, recover, die, etc.).Mt is a hazard rate (gives chance of event happening over asmall interval).Change of status in small interval δt given approximately by Mtδt.In theory, approximation can be as precise as desired by choosingsmall enough values for δt.
2 Draw a random number 0 ≤ n1 ≤ 1 and calculate time afterwhich next transition occurs.
T = − ln(n1)
Mt. (2)
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Summary of Method 3 (cont.)
Method (cont.)3 Calculate probability that each type of transition will occur. Use
this to calculate a range in which a number drawn at randommust lie for a given transition to occur.
4 Draw random number n2 to determine transition occurring next.5 Use result from Step 4 to update number of individuals
susceptible, infectious, and immune present in the population,and return to Step 1.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Example: SIR Model
SIR model:
S′ = −βSI
I′ = βSI − rI
R′ = rI,
where β = rate at which two individuals come into effectivecontact per unit time and r = rate that infectious recover.Illustrate computation of Mt: Using SIR model, total rate atwhich individuals can change their current status is given by sumof rates at which susceptible individuals become infected andinfectious , and infectious recover to become immune:
Mt = βSI + rI.Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Example: SIR Model (cont.)
Compute probability each type of transition occurs:
P(one susceptible becomes infectious during next time step) =βSIMt
P(one infectious recovers in next time step) =rIMt
So, if random number drawn in interval(
0,βSIMt
), one
susceptible becomes infectious in next time interval; otherwiseone infectious individual recovers.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Which Approach is Best?
Method 1 is more computationally demanding than Method 2.
Method 3 is computationally demanding for large populationsize or many events.
Advantage of Method 3: Allows step size to vary and comesclose to describing events occurring continuously.
Methods 1 and 2: Can approximate events in continuous timeusing sufficiently small time step size.Choice of approach depends on
1 size of problem, and2 computing resources available.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Inferring Reproduction Numbers from Distributions ofOutbreak Size
For stochastic model, even if reproduction number larger than 1,an outbreak is predicted to occur only in some model runs.An outbreak in a stochastic model can occur even if reproductionnumber less than 1 because of chance variation.Methods have beendeveloped to estimate net reproductionnumber from observed distributions of outbreak sizes.Theory: Distribution of outbreak sizes in a given populationrelated to the reproduction number R (since it could be net orbasic):
P(outbreak size = k) =Rk−1e−Rkkk−2
(k − 1)!, k = 1, 2, 3, . . . .
The above assumes R < 1. See also Figure 6.10.Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Modeling Transmission in Small Populations and thePersistence of Infection
Stochastic models tend to deal with only integer numbers ofindividuals, so transimission stops once number infectious goesbelow 1.
Stochastic models appropriate for addressing questions involvingsmall populations, e.g., 10-100, in which chance effects may leadto small number of infections and transmission ceasing.
Also appropriate for addressing questions related to persistenceof infections in populations of a given size
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Individual-Based Microsimulation Models
Track status of every individual in a population, generally usingcombinations of the different methods, with or without somedeterministic elements.Used to explore impact of interventions against pandemicinfluenza.
Germann, et al., and Ferguson, et al., describe US population.Use detailed movement patterns.Requires intense computing power to get useful results.
Dr. Doreen De Leon An Introduction to Stochastic Modeling
OutlineAn Introduction to Stochastic Modeling
Individual-Based Models (Method 1)Discrrete-Time Stochastic Compartmental Models (Method 2)
Extensions to Methods 1 and 2Continuous Time (“Time to Next Event”) Compartmental Models (Method 3)
Choosing the Best ApproachInsights and Applications of Stochastic Models
Advantanges/Disadvantages of Individual-BasedMicrosimulation Models
DisadvantagesDifficult to set up and slow to run.The most detailed models require many input parameters, someof which may not be readily available.
AdvantagesCan be used to explore impact of interventions targeted at thehousehold, school, or workplace.Intuitively easier to understand, since they track the status of allindividuals in the population.By tracking experience of each individual in a population, theyare better than deterministic models at describing transmission ofinfections for which the risk of disease or another outcomedepends on the person’s previous exposure history.
Dr. Doreen De Leon An Introduction to Stochastic Modeling