5

I don't know whether this is a pure statistics, math or programming question so kindly let me know if there is a better place to post this question.

I am trying to implement the SIS epidemic model when the nodes have mobility. I understand how to perform this simulation in an analytical fashion. However, things get rather confusing when nodes are mobile.

The model assumes that each node can infect any node and hence the equations are valid. But when nodes are mobile, each node is not able to infect every other node (the other node might not be within the range) and has to explicity send a message to a node that is susceptible in order to infect it. In that case, give an infection rate B, how do I simulate this when the nodes are mobile?

Currently, the way I am doing this is in the following way:

def Controller():
    for i in range(1,100):
        randNum = getRand()
        if (randNum <= InfectionRate):
            neighbors = getNeighbors(i)
            ScheduleTransmission(getCurrentTime(), i, neighbors)
    Schedule(getCurrentTime() + 1, Controller)

My problem is that I am not understanding if the infection rate can now be captured through a single value (which was previously B). If not, how does one analyze this scenario? Do I set the InfectionRate as B/numNodes so that the overall probability will be B? Any suggestions?

UPDATE: Back calculating Beta and improved infection strategy

def Controller():
    for i in range(1,100):
        neighbors = getNeighbors(i)
        k = len(neighbors)
        for j in neighbors:
           beta = -k log(1-c)
           if (beta <= InfectionThreshold):
                 ScheduleTransmission(getCurrentTime(), i, j)
    Schedule(getCurrentTime() + 1, Controller)
Glen_b
  • 257,508
  • 32
  • 553
  • 939
Legend
  • 4,232
  • 7
  • 37
  • 50
  • I do a fair number of epidemic simulations for my work, but odds are you'll be better served on one of the math sites. I'm giving my take, but it might be a better question for elsewhere. – Fomite Oct 04 '11 at 00:27
  • @EpiGrad: I asked it at a few other places. I will delete this question once I get an acceptable answer. I see from your profile that you seem to be quite familiar with this area. In the mean time, would you have any suggestions about this? Also a slightly unrelated question, is there an epidemiology community somewhere where I can go ask such questions? Thanks! – Legend Oct 04 '11 at 00:33
  • 1
    As for the community, no, there really isn't one. The statistics site here is probably the closest, with occasional forays into StackOverflow etc. when you need it. By coincidence however, I am trying to start one...http://area51.stackexchange.com/proposals/34565/public-health-epidemiology – Fomite Oct 04 '11 at 00:41
  • @EpiGrad: Thank You for taking the initiative. I started following it :) Would really love it to become an actual site. – Legend Oct 04 '11 at 00:45
  • can you provide a possible explanation for choosing this particular form "beta = -k log(1-c)" ? – Guest Mar 29 '17 at 10:19

1 Answers1

2

It depends on what you mean by "mobile" - and how you wish to simulate it. It sounds like you're trying for a purely agent based approach.

I assume by "B" you're actually referring to a parameter that is usually "Beta". If that's the case, know that Beta isn't actually a single probability. It is usually formulated as follows:

beta = -k log(1-c), where k is the average number of contacts per unit time, and c is the probability of successful transmission (Keeling and Rohani, 2008). Most models that don't assume homogeneous mixing - like the ones you are currently talking about - don't bother with beta, and just directly estimate k and c, and compute whether or not an individual has been infected from that (i.e. Did node come in contact with an infected node? If yes, was transmission successful? If yes, node is infected). Note that you can tinker with these numbers until you get an estimated beta that is equal to the beta of your compartmental model, but because of stochasticity, it will never be quite the same.

Fomite
  • 21,264
  • 10
  • 78
  • 137
  • +1 Very interesting. Yes I was referring to `Beta` by `B` and as a starting point I am using a Random Waypoint mobility model for the nodes. From what I understand, I should not be using `Beta` but instead be estimating `k` and `c`. In this case, I should probably be setting `c` instead of `B`. However, isn't `k` different for each node at each point in time? Oh.. so what you are saying is that `k` should be estimated instantaneously on a per node basis and from there `beta` can be estimated. This can then be used as the threshold? Am I understanding this correctly? Thanks! – Legend Oct 04 '11 at 00:41
  • Yes. c is usually a fixed constant value, which means k is the only one that varies. In a purely compartmental model, it doesn't and so you get a constant beta. Depending on how you model your more complex case, k can do all kinds of things. For example, if you simulate this in a static network k is fixed for all nodes. In a dynamic network, or an agent-based model, k can be obtained for each node at each time point. From there, yes, you can back calculate beta. Can I ask what you mean by "used as the threshold?". – Fomite Oct 04 '11 at 00:45
  • Honestly, I would dispense with InfectionRate or anything beyond c and k. The only real appeal to being able to back-calculate to beta is to be able to directly compare the results of a compartmental model with a non-compartmental form. I really could just have a two step coding process. Essentially, find the neighbors of Node X capable of infecting Node X, and for each, generate a uniform random. If that random <= c, then Node X is infected. Does that make sense? – Fomite Oct 04 '11 at 01:13
  • Oh... that "used as the threshold" refers to InfectionRate in my code which is the infection threshold (if beta is beyond this then the node can successfully infect the other node). I accepted this as the answer. One final request is perhaps if you could take a look at my updated code in my question. So now the probability of a node infecting its neighbors is just dependent on `k` and `c`. I am not sure if I am doing the thresholding right i.e. `if beta <= InfectionThreshold` in my code. – Legend Oct 04 '11 at 01:15
  • Yes! That makes a lot more sense. I will hopefully not trouble you more on this :) Thank you once again for your time. Your insights have been very helpful to me. – Legend Oct 04 '11 at 01:17