Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 240

DE models for the spread of grassroots political views

Introduction
Differential equation models for the spread of infectious diseases have been widely extended and adapted to a variety of other application areas. In this lab we explore a class of similar models for studying the spread of political views. As with infectious diseases, the overall strategy consists of splitting the entire population into distinct, non-overlapping groups, whose numbers change as a function of time.

Consider, for example, the problem of modeling a political issue on which there are only two sides. Let NN denote the population of interest and let II represent the number of individuals in the population who support the political idea under consideration. Then the number who oppose the idea would be S=NIS=N-I. This provides a natural framework for adapting an SIS (Susceptible-Infected-Susceptible) type of infectious disease model.

As seen in the compartmental sketch, the only difference between the disease and the political ideas model is in how we interpret the contents of each compartment. However, the options get more interesting, and diverse, if we consider models with 3 or more compartments. For instance, the compartmental sketch below shows an SIRS (Susceptible-Infected-Recovered-Susceptible) schematic for diseases and for political ideas.

Unlike the infectious disease situation, in the case of political ideas, members of any group can directly move into any other group. Thus, the model terms must be modified to account for these additional possibilities.
Lab project
We will develop an SIS and SIR type of model for the spread of political ideas. This will involve model development, analysis, and parameter estimation. To help us think concretely through the details of model development, we will work with historical data from past political events. The figure below shows a 5-year history of U.S. public opinion about the U.S. war against Iraq, compiled by the Pew Research Center.

Although the results are shown in the form of a graph, the details are sufficient to estimate approximate values for the parameters, and to fit approximate models to the data. We will study two models for simulating these data.

 

  1. The SIS model: From the epidemiology literature, this model has the form S=βSIN+γII=βSINγI S^\prime = -\beta \frac{S I}{N} + \gamma I \\ I^\prime = \beta \frac{S I}{N} - \gamma I where SS and II, respectively, denote the number of susceptibles and infectives in a population of constant size NN, and the rest of the quantities are parameters. In adapting this model to political ideas/opinion, we would need to associate SS and II with the number of people on either side of a political position. This model doesn't permit more than two sides for the political position. We will do our best to fit it to the Iraq war data. To keep things simple, let N=100N=100. Then SS, II, will directly correspond to percentages of the population. Here are some items to explore and address
  2.  
    • The SIS model admits non-zero, stable equilibrium solution(s). Why does that suggest it may be suitable to simulate the Pew data (if we focus on two variables)?
    • Make suitable choices for the two variables, e.g., by ignoring one variable or combining it with one of the others.
    • Using the Pew data, estimate the values of the parameters in the model. Use data from the graphs, together with your understanding of equilibrium solutions and stability to get the best parameter values. Compute solutions (using Sage or other methods) and show how well your model works.

     

  3. The SIZS model: This is an extension of the SIR model from epidemiology. The key difference is that it allows members of any group to directly move into any other group. The model has the form S=βi(S+Z)INβz(S+I)ZN+γiI+γzZI=βi(S+Z)INγiIZ=βz(S+I)ZNγzZ S^\prime = -\beta_i \frac{(S+Z) I}{N} - \beta_z \frac{(S+I) Z}{N} + \gamma_i I + \gamma_z Z \\ I^\prime = \beta_i \frac{(S+Z) I}{N} - \gamma_i I \\ Z^\prime = \beta_z \frac{(S+I) Z}{N} - \gamma_z Z In this model, the variables would have the following interpretation:

    S(t)=S(t) = number of susceptible people at time t (e.g., no opinion on the Iraq war)

    I(t)=I(t) = number of people "infected" with the idea

    Z(t)=Z(t) = number of people opposed to the idea I(t)I(t) above

    Here are the tasks to consider with this model
  4.  
    • Make suitable choices for the variables.
    • Using the Pew data, estimate the values of the parameters in the model. Think about equilibrium solutions and stability to help in this task.
    • Here is one strategy that works, though there may be others that work even better. The segment below is reproduced from my rough notes, so use it at your own risk!

      There are 4 parameters in this model. Suppose we know the long-term (steady-state) values of S, I, Z. In other words, we know S()S(\infty), I()I(\infty), and Z()Z(\infty). Then, we can compute the following two ratios:

      γi/βi=(S+Z)/N\gamma_i/\beta_i = (S + Z) / N, γz/βz=(S+I)/N\gamma_z/\beta_z = (S + I) / N

      Next, suppose we can find a way to estimate I(0)I^\prime(0) and Z(0)Z^\prime(0), together with the values S(0),I(0),Z(0)S(0), I(0), Z(0). From the model ODEs we get

      γi=βi[S(0)+Z(0)]/NI(0)/I(0)\gamma_i = \beta_i [S(0)+Z(0)] / N - I^\prime(0)/I(0), γz=βz[S(0)+I(0)]/NZ(0)/Z(0)\gamma_z = \beta_z [S(0)+I(0)] / N - Z^\prime(0)/Z(0)

      Then γi,γz\gamma_i, \gamma_z are known in terms of βi,βz\beta_i, \beta_z respectively. These can be plugged into the previous γi/βi\gamma_i/\beta_i, γz/βz\gamma_z/\beta_z ratios.
    • Compute solutions (using Sage or other methods) and show how well your model works.

 

Shown below is sample sage code to solve a system of 3 ODEs and plot each component of the solution on a common axis.
# Example showing num soln of the SIR diff eqn model # Systems is: S'= - b*S*I; I' = b*S*I -g*I; R'= g*I s, i, r, t = var('s i r t') b = 5e-6 g = 1/2 s0 = 1e6 i0 = 5 r0 = 0 de1 = - b*s*i de2 = b*s*i - g*i de3 = g*i P = desolve_system_rk4 ([de1, de2, de3], [s, i, r], ics=[0, s0, i0, r0], ivar=t, end_points=[0,15] ) Q = [ [i,j] for i, j, k, l in P] P1 = line(Q) Q = [ [i,k] for i, j, k, l in P] P2 = line(Q, color='green') Q = [ [i,l] for i, j, k, l in P] P3 = line(Q, color='red') show(P1+P2+P3)