Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modeling frameworks Today, compare:Deterministic Compartmental Models (DCM) Stochastic Pairwise Models (SPM) for (I, SI, SIR, SIS) Rest of the week: Focus.

Similar presentations


Presentation on theme: "Modeling frameworks Today, compare:Deterministic Compartmental Models (DCM) Stochastic Pairwise Models (SPM) for (I, SI, SIR, SIS) Rest of the week: Focus."— Presentation transcript:

1 Modeling frameworks Today, compare:Deterministic Compartmental Models (DCM) Stochastic Pairwise Models (SPM) for (I, SI, SIR, SIS) Rest of the week: Focus on Stochastic Network Models UW - NME 201318-13 July 2013

2 Deterministic Compartmental Modeling SusceptibleInfectedRecovered 8-13 July 2013UW - NME 20132

3 A form of dynamic modeling in which people are divided up into a limited number of “compartments.” Compartments may differ from each other on any variable that is of epidemiological relevance (e.g. susceptible vs. infected, male vs. female). Within each compartment, people are considered to be homogeneous, and considered only in the aggregate. Compartmental Modeling Compartment 1 3 8-13 July 2013UW - NME 2013

4 People can move between compartments along “flows”. Flows represent different phenomena depending on the compartments that they connect Flow can also come in from outside the model, or move out of the model Most flows are typically a function of the size of compartments Compartmental Modeling SusceptibleInfected 4 8-13 July 2013UW - NME 2013

5 May be discrete time or continuous time: we will focus on discrete The approach is usually deterministic – one will get the exact same results from a model each time one runs it Measures are always of EXPECTED counts – that is, the average you would expect across many different stochastic runs, if you did them This means that compartments do not have to represent whole numbers of people. 5 8-13 July 2013UW - NME 2013 Compartmental Modeling

6 Constant-growth model Infected population t = time i(t)= expected number of infected people at time t k = average growth (in number of people) per time period 6 8-13 July 2013UW - NME 2013

7 recurrence equation difference equation (three different notations for the same concept – keep all in mind when reading the literature!) 7 8-13 July 2013UW - NME 2013 Constant-growth model

8 Example: Constant-growth model i(0) = 0; k = 7 8 8-13 July 2013UW - NME 2013

9 Proportional growth model Infected population t = time i(t)= expected number of infected people at time t r = average growth rate per time period recurrence equation difference equation 9 8-13 July 2013UW - NME 2013

10 Example: Proportional-growth model i(1) = 1; r = 0.3 10 8-13 July 2013UW - NME 2013

11 SusceptibleInfected New infections per unit time (incidence) t = time s(t)= expected number of susceptible people at time t i(t) = expected number of infected people at time t What is the expected incidence per unit time? 11 8-13 July 2013UW - NME 2013 SI model

12 A new infection requires: a susceptible person to have an act with an infected person and for infection to transmit because of that act Expected incidence at time t 12 t = time s(t)= expected number of susceptible people at time t i(t) = expected number of infected people at time t 8-13 July 2013UW - NME 2013 SI model

13 Expected incidence at time t 13 t = time s(t)= expected number of susceptible people at time t i(t) = expected number of infected people at time t 8-13 July 2013UW - NME 2013 A new infection requires: a susceptible person to have an act with an infected person and for infection to transmit because of that act

14 SI model Expected incidence at time t 14 8-13 July 2013UW - NME 2013 A new infection requires: a susceptible person to have an act with an infected person and for infection to transmit because of that act

15 Expected incidence at time t 15 8-13 July 2013UW - NME 2013 A new infection requires: a susceptible person to have an act with an infected person and for infection to transmit because of that act SI model

16 Expected incidence at time t 16 8-13 July 2013UW - NME 2013 A new infection requires: a susceptible person to have an act with an infected person and for infection to transmit because of that act

17 SI model Expected incidence at time t 17 8-13 July 2013UW - NME 2013 A new infection requires: a susceptible person to have an act with an infected person and for infection to transmit because of that act

18 Careful: only because this is a “closed” population SI model Expected incidence at time t 18 8-13 July 2013UW - NME 2013 A new infection requires: a susceptible person to have an act with an infected person and for infection to transmit because of that act

19 SusceptibleInfected What does this mean for our system of equations? Expected incidence at time t 19 8-13 July 2013UW - NME 2013 SI model

20 SusceptibleInfected What does this mean for our system of equations? Expected incidence at time t 20 8-13 July 2013UW - NME 2013 SI model

21 Remember: constant-growth model could be expressed as: proportional-growth model could be expressed as: SI model - Recurrence equations 21 The SI model is very simple, but already too difficult to express as a simple recurrence equation. Solving iteratively by hand (or rather, by computer) is necessary 8-13 July 2013UW - NME 2013

22 SusceptibleInfected SIR model Recovered 22 What if infected people can recover with immunity? And let us assume they all do so at the same rate: 8-13 July 2013UW - NME 2013

23 Relationship between duration and recovery rate Imagine that a disease has a constant recover rate of 0.2. That is, on the first day of infection, you have a 20% probability of recovering. If you don’t recover the first day, you then have a 20% probability of recovering on Day 2. Etc. Now, imagine 100 people who start out sick on the same day. How many recover after being infected 1 day? How many recover after being infected 2 days? How many recover after being infected 3 days? What does the distribution of time spent infected look like? What is this distribution called? What is the mean (expected) duration spent sick? 238-13 July 2013UW - NME 2013 100*0.2 = 20 80*0.2 = 16 64*0.2 = 12.8 Right-tailed Geometric 5 days ( = 1/.2) D = 1/ 

24 Expected number of new infections at time t still equals where n now equals Expected number of recoveries at time t equals So full set of equations equals: SIR model 248-13 July 2013UW - NME 2013

25 susceptible infected recovered What happens on Day 62? Why? 258-13 July 2013UW - NME 2013

26 Qualitative analysis pt 1: Epidemic potential Using the SIR model 268-13 July 2013UW - NME 2013

27 27 Compartment sizesFlow sizes Susceptible Infected Recovered Transmissions (incidence) Recoveries 8-13 July 2013UW - NME 2013

28 28 Compartment sizesFlow sizes Susceptible Infected Recovered Transmissions (incidence) Recoveries 8-13 July 2013UW - NME 2013

29 SusceptibleInfected SIR model with births and deaths Recovered 29 birth death trans. recov. 8-13 July 2013UW - NME 2013

30 Stochastic Pairwise models (SPM) 8-13 July 2013UW - NME 201330

31 UW - NME 201331 Basic elements of the stochastic model System elements – Persons/animals, pathogens, vectors States – properties of elements As before, but Transitions – Movement from one state to another: Probabilistic 8-13 July 2013

32 UW - NME 201332 Deterministic vs. stochastic models Simple example: Proportional growth model – States: only I is tracked, population has an infinite number of susceptibles – Rate parameters: only, the force of infection (  =  ) DeterministicStochastic Incidence (new cases) 8-13 July 2013

33 UW - NME 201333 What does this stochastic model mean? Depends on the model you choose for P(●) P(●) is a probability distribution. – Probability of what? … that the count of new infections dI = k at time t – So what kind of distributions are appropriate? … discrete distributions – Can you think of one? Example: Poisson distribution Used to model the number of events in a set amount of time or space Defined by one parameter: it is the both the mean and the variance Range: 0,1,2,… (the non-negative integers) The pmf is given by: 8-13 July 2013

34 UW - NME 201334 How does the stochastic model capture transmission? The effect of  on a Poisson distribution Mean: E(dI t )= t Variance: Var(dI t )= t If we specify: t =  I t dt Then: E(dI t )=  I t dt, the deterministic model rate 8-13 July 2013

35 UW - NME 201335 What do you get for this added complexity? Variation – a distribution of potential outcomes – What happens if you all run a deterministic model with the same parameters? – Do you think this is realistic? Recall the poker chip exercises Did you all get the same results when you ran the SI model? Why not? Easier representation of all heterogeneity, systematic and stochastic – Act rates – Transmission rates – Recovery rates, etc… When we get to modeling partnerships: – Easier representation of repeated acts with the same person – Networks of partnerships 8-13 July 2013

36 UW - NME 201336 Example: A simple stochastic model programmed in R First we’ll look at the graphical output of a model … then we’ll take a peek behind the curtain 8-13 July 2013

37 UW - NME 201337 Behind the curtain: a simple R code for this model # First we set up the components and parameters of the system steps <- 70 # the number of simulation steps dt <- 0.01 # step size in time units total time elapsed is then steps*dt i <- rep(0,steps) # vector to store the number of infected at time(t) di <- rep(0,steps) # vector to store the number of new infections at time(t) i[1] <- 1 # initial prevalence beta <- 5 # beta = alpha (act rate per unit time) * # tau (transmission probability given act) 8-13 July 2013

38 # Now the simulation: we simulate each step through time by drawing the # number of new infections from the Poisson distribution for(k in 1:(steps-1)){ di[k] <- rpois(n=1, lambda=beta*i[k]*dt) i[k+1] <- i[k] + di[k] } In words: For t-1 steps (for(k in 1:(steps-1))) Start of instructions ( { ) new infections at step t <- randomly draw from Poisson (rpois) di[k] one observation (n=1) with this mean (lambda= … ) update infections at step t+1 <- infections at (t) + new infections at (t) i[k+1] i[k] ni[k] End of instructions ( } ) UW - NME 201338 Behind the curtain: a simple R code for this model t =  I t dt 8-13 July 2013

39 UW - NME 201339 The stochastic-deterministic relation Will the stochastic mean equal the deterministic mean? – Yes, but only for the linear model – The variance of the empirical stochastic mean depends on the number of replications Can you represent variation in deterministic simulations? – In a limited way Sensitivity analysis shows how outcomes depend on parameters Parameter uncertainty can be incorporated via Bayesian methods Aggregate rates can be drawn from a distribution (in Stella and Excel) – But micro-level stochastic variation can not be represented. Will stochastic variation always be the same? – No, can specify many different distributions with the same mean Poisson Negative binomial Geometric … – The variation depends on the probability distribution specified 8-13 July 2013

40 To EpiModel… UW - NME 2013408-13 July 2013

41 is required by condition 3, and also satisfies conditions 1 and 2 Without new people entering the population, the epidemic will always die out eventually. Note that s(t) and r(t) can thus take on different values at equilibrium also written as 41 Appendix: Finding equilibria Using the SIR model without birth and death or 8-13 July 2013UW - NME 2013


Download ppt "Modeling frameworks Today, compare:Deterministic Compartmental Models (DCM) Stochastic Pairwise Models (SPM) for (I, SI, SIR, SIS) Rest of the week: Focus."

Similar presentations


Ads by Google