THIS WEEK IN ENVIRONMENTAL HEALTH




WEEK # 10 (November 2 - 6, 1998)


COMPUTER MODELING
Dr. Robin Selinger, Department of Physics, CUA


Lecture #3 --- Monday November 2, 1998


Mathematical models come in various flavors: stochastic vs. deterministic, and spatially distributed vs. spatially homogeneous ("mixing bowl")


Stochastic vs. deterministic

Stochastic models involve randomness. To simulate the model you need random numbers. On the computer screen in lab, trees are drawn at random on the screen with a given density. To accomplish this we use a pseudo-random number generator that produces a string of numbers, all between 0 and 1. If the probability density is p=0.7, then at each site in the lattice we take one of these random numbers (call it x) and if x<0.7, we go ahead a draw a tree, otherwise leave the spot blank. Then go to the next site in the lattice and do it again. When you’re done you have a random distribution of trees. Then you choose where to start the fire. In the computer lab, the fire starts all across one side of the forest; in the classroom, I started it at one point. But once the fire is started, for then on the model is deterministic—you don’t need any random numbers to decide which way the fire will propagate.

We could make the propagation process random by changing the rules. E.g. we could let the "trees" walk around on the screen while the fire is propagating. Or we could let the wind blow the fire in one direction but not others, and we could let the wind change directions randomly.

When we ran the model epidemic in the classroom, we also used random numbers. We used the last digit of your social security number. When you were assigned a SS# the chances of having it end in any digit are even for all digits. Thus if I say "everyone whose SS# ends with the digit 4" I will get about 10% of you chosen at random.

Aside…This does not work if I use the first digit of your SS# because that is correlated with the location of the SS office where it was assigned. Since many of you are from the same geographic region, the first digit of your SS# might not be evenly distributed (ask the class to see.) So be careful—not all numbers are random numbers!

So stochastic models require random numbers. Deterministic models don’t. They always run the same way with no input from a random number generator, no coin flipping. The model we wrote down for your bank account

S(0)=$100 S(n+1)=S(n) (1+r)

is a deterministic model—no randomness, assuming the daily interest rate r is constant. (r = annual interest rate/365.)


Another distinction: mathematical models can be spatially distributed or homogeneous. That is, in the percolation model we had a bunch of individuals sitting at specific locations laid out in a two-dimensional plane. (Aside: you can do percolation models in 3 dimensions by putting the "trees" on a 3-d lattice. Believe it or not, you can do 4-dim and 5-dim if you want…the computer is a powerful tool for simulating phenomena in higher dimensions!)

But a model of the type

S(n+1)=S(n) + r S(n)(1-S(n))

Here S(n) is the fraction of people in the group that are sick so 0 < S(n) < 1. Let’s assume that once you are exposed you are immediately infected and contagious, and you never become uninfected, on the time scale we are following the model no one is born or dies or moves in or moves away.

Our model says that on day n, S(n)*10,000 people are sick, doesn’t say where they are spatially located or who is next to whom at any given time.

This is a kind of mixing bowl model and it is the same kind of kinetics as in chemical reactions.

The underlying assumption is that people who are infected S(n) and people who are not infected (1-S(n)) are well mixed in the population, and that the number of contact/transmissions between a contagious person and a susceptible person is just the product S(n) (1-S(n)) times a factor r.

In fact, this number is a statistical estimate describing the most probably outcome from a process which is in fact a random one.

From one of these equations, how can we guess how a system behaves in the long run?

To start with you can choose a value of r and an initial state S(0), and use your calculator or computer to see how S(n) evolves over time.


Another way: COBWEBS

Now, people do get better eventually. How to add that to the model?






Concepts about discrete dynamical systems


What else do we need to include in our model?

  • People joining/leaving the group (or births and deaths)

  • Delay between time of exposure and time of becoming contagious

  • Delay between time of exposure and time of showing symptoms

  • Natural immunity

  • Vaccine-induced immunity

  • Quarantine

Let’s talk about quarantine:

In the case where people are contagious long before they show symptoms, quarantining those with symptoms isn’t necessarily going to stop the epidemic (AIDS).

In the case where people are not contagious until they show symptoms, quarantine can be an effective tool against an epidemic.

Quarantine does not necessarily mean the police locking people up or confining them in house arrest!

Quarantine is also what families do when they keep their kids home from school until the chicken pox have dried up and scabbed over (even though the worst of the illness itself is over much more quickly and the child is likely bored sitting indoors for a week or two.)

Next time: an introduction to Stella and thinking about dynamical systems!





COMPUTER MODELING
Dr. Robin Selinger, Department of Physics, CUA


Lecture #4 --- Friday, November 6, 1998




Basic mathematical model of an epidemic:

S(n+1) = S(n) + r S(n) [1 – S(n)] - b S(n)

Sick tomorrow = Sick today + new cases - recoveries

  • S(n) = fraction of population that is sick on day n

  • r = contact rate

  • r large: disease very easily transmitted

  • r small: disease not very easily transmitted

Improving public health measures can reduce the contact rate. Frequent travel increases it!

b = getting better rate (describes the fraction of sick people that recover each day


New cases = r S(n) [ 1 - S(n) ] …mixing infected and uninfected people

Recoveries = b S(n) ...a fraction b get better each day


Assumptions that are used in building this model:

  1. Members of the group are well mixed: contact between any two members has equal probability (people don’t hang out in cliques.)

  2. Once a person recovers from the illness they are again susceptible and can be re-infected.

  3. People who are sick are not quarantined or clustered within the population but continue to mix freely with the rest of the group.







What else can we put into the model?

  1. 1. Post-infection immunity

    • After recovering from infection, you’re immune and will not become reinfected (e.g. Measles)

  2. Vaccination

    • Some fraction of the population has received a vaccine or has natural immunity and cannot become infected.

    Herd immunity

    • Vaccinating a relatively small fraction (less than half) of the population can prevent epidemics

    • A different mechanism than percolation, but same effect!
  3. 3. Quarantine

    • Separating infected people from the rest of the population can reduce the chances of an epidemic

    • When is it useful?

    • Subgroups

    • Sometimes different members of the population have different risk factors due to patterns of contact with others or other factors (cliques)







How does an epidemiologist make predictions about the course of an ongoing epidemic?

1. Collect data about how many people are infected vs. time

2. Build a mathematical model, including basic model only or perhaps with more details, e.g. subgroups with different contact rates

3. Fit parameters in the model to match historical data

  • Contact rate can change with time, e.g. people start being more careful about contact after the epidemic starts

  • Recovery rate can change with time if new treatments become available

  • Use detailed public health studies of at-risk populations to help estimate parameters

4. Use your fitted parameters to run the model forward in time to make predictions about the future.


This is the same basic technique used for mathematical modeling of just about anything !

What else can we imagine?

  • Percolation models had spatial organization
  • Dynamical systems modeling S(n+1)=… has no spatial organization


Can imagine setting up a model of S(n,x,y) which has spatial variation as well as simple dynamics!


Computer Lab #2: STELLA


Stella is a software tool for studying dynamical systems.

You will study:

  • Basic model (contact rate and recovery rate)
  • Basic model + vaccines (some people are immune)
  • Basic model + vaccines + post-infection immunity

Your job: figure out how to make predictions about the course of an epidemic!





Click here to go to the Archives Page!



Click here to fly back to the home page!