Lukas Püttmann    About    Research    Blog

SIR-model

In a new working paper, Robert Shiller writes about the importance of narratives. He argues that economists should try to understand what the stories are that people tell each other and this influences decisions.

For a model of how such stories might spread, he refers to the Kermack and McKendrick SIR-model of disease infection. In the model, there are a fixed number of people \(N\) which are in one of three states: susceptiple (\(S\)), infected (\(I\)) or recovered (\(R\)). They evolve as follows:

\[\begin{eqnarray} \frac{dS}{dt} =& -cSI \\ \frac{dI}{dt} =& \phantom{-} cSI - rI \\ \frac{dR}{dt} =& rI \phantom{a} \end{eqnarray}\]

Initially, almost everybody is susceptible. Then more and more people become infected as susceptibles become affected when they meet an infective with a fixed probability (\(c\)). However, a fixed share (\(r\)) of the infected recover permanently every period.

In Julia, we could simulate the model as follows:

# Parameters
N = 100         # population size
c = 0.005       # probability of infection
r = 0.05        # probability of recovery
T = 180         # periods

# Initialize vectors
I = Float64[1]  # initially infected
R = Float64[0]  # initially recovered
S = Float64[99] # initially susceptible

# Simulate model
for t = 2:T
    # Next period's values
    Rnew = R[t-1] + r * I[t-1]
    Inew = I[t-1] + c * S[t-1] * I[t-1] - r * I[t-1]
    Snew = N - Inew - Rnew

    # Save new value in vector
    push!(I, Inew)
    push!(R, Rnew)
    push!(S, Snew)   
end

Which gives:

SIR-model

The share of infected people peaks when there’s a large number of infected people around, but also a large enough share of people who have not yet had the disease. After that, slowly everybody gets infected, then recovers and the disease dies out.

I like this from Shiller’s paper:

Bartholomew (1982) argued that when variations of the Kermack-McKendrick model are applied to the spread of ideas, we should not assume that ceasing to infect others and forgetting are the same thing. Human behavior might be influenced by an old idea not talked about much but still remembered. This has been called “behavioral residue” (Berger, 2013).