︠e9be18ec-0307-4f93-8e07-7b5e87a44616i︠ %hide %html

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 $N$ denote the population of interest and let $I$ 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=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. ︡98a22fb6-10ce-4e98-b3bf-2356cb3069d4︡{"hide":"input"}︡{"html":"

\nDE models for the spread \nof grassroots political views\n

\n\n
\n Introduction\n
\n\n\nDifferential equation models for the spread of infectious \ndiseases have been widely extended and adapted to a \nvariety of other application areas. In this lab we explore a \nclass of similar models for studying the spread of \npolitical views. As with infectious diseases, the overall \nstrategy consists of splitting the entire population into \ndistinct, non-overlapping groups, whose numbers change \nas a function of time.\n

\n\nConsider, for example, the problem of modeling a political \nissue on which there are only two sides. Let $N$ denote the \npopulation of interest and let $I$ represent the number of \nindividuals in \nthe population who support the political idea under \nconsideration. Then the number who \noppose the idea would be $S=N-I$. This provides a natural \nframework for adapting an SIS (Susceptible-Infected-Susceptible) \ntype of infectious disease \nmodel.\n

\n\n\n \n \n \n
\n \n \n
\n\n\nAs seen in the compartmental sketch, the only difference \nbetween the disease and the political ideas model is \nin how we interpret the contents of each compartment. \nHowever, the options get more interesting, and diverse, \nif we consider models with 3 or more compartments. \nFor instance, the compartmental sketch below shows an \nSIRS (Susceptible-Infected-Recovered-Susceptible)\nschematic for diseases and for political ideas. \n

\n\n\n \n \n \n
\n \n \n
\n\nUnlike the infectious disease situation, in the case of \npolitical ideas, members of any group \ncan directly move into any other group. Thus, the model \nterms must be modified to account for these additional \npossibilities. "}︡{"done":true}︡ ︠dafc5133-a34f-472c-a523-d29205e9da52si︠ %hide %html
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^\prime = -\beta \frac{S I}{N} + \gamma I \\ I^\prime = \beta \frac{S I}{N} - \gamma I \] where $S$ and $I$, respectively, denote the number of susceptibles and infectives in a population of constant size $N$, and the rest of the quantities are parameters. In adapting this model to political ideas/opinion, we would need to associate $S$ and $I$ 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=100$. Then $S$, $I$, will directly correspond to percentages of the population. Here are some items to explore and address
  2.  

     

  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^\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) =$ number of susceptible people at time t (e.g., no opinion on the Iraq war)

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

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

    Here are the tasks to consider with this model
  4.  

 

Shown below is sample sage code to solve a system of 3 ODEs and plot each component of the solution on a common axis. ︡242bb141-da17-44d3-875b-5ce8face4fe7︡{"hide":"input"}︡{"html":"\n
\n Lab project\n
\n\nWe will develop an SIS and SIR type of model for the spread \nof political ideas. This will involve model development, \nanalysis, and parameter estimation. To help us think \nconcretely through the details of model development, we \nwill work with historical data from past political events. \nThe figure below shows a 5-year history of U.S. public opinion \nabout the U.S. war against Iraq, compiled by the Pew Research \nCenter.\n

\n\n\n \n \n \n
\n \n \n
\n\n\nAlthough the results are shown in the form of a graph, \nthe details are sufficient to estimate approximate values \nfor the parameters, and to fit approximate \nmodels to the data. We will study two models for \nsimulating these data.\n

 

\n\n\n
    \n
  1. The SIS model: \nFrom the epidemiology literature, this model has the form\n\\[\n S^\\prime = -\\beta \\frac{S I}{N} + \\gamma I \\\\\n I^\\prime = \\beta \\frac{S I}{N} - \\gamma I \n\\]\nwhere $S$ and $I$, respectively, denote the number of \nsusceptibles and infectives in a population of constant size $N$, and \nthe rest of the quantities are parameters. In adapting this \nmodel to political ideas/opinion, we would need to associate \n$S$ and $I$ with the number of people on either side of a \npolitical position. This model doesn't permit more than two \nsides for the political position. We will do our best to fit \nit to the Iraq war data. To keep things simple, let $N=100$. \nThen $S$, $I$, will directly correspond to percentages \nof the population. Here are some items to explore and address
  2. \n \n\n\n

     

    \n\n\n
  3. The SIZS model: \nThis is an extension of the \nSIR model from epidemiology. The key difference is that it \nallows members of any group to directly move into any \nother group. The model has the form\n\\[\n S^\\prime = -\\beta_i \\frac{(S+Z) I}{N} - \\beta_z \\frac{(S+I) Z}{N} \n + \\gamma_i I + \\gamma_z Z \\\\\n I^\\prime = \\beta_i \\frac{(S+Z) I}{N} - \\gamma_i I \\\\\n Z^\\prime = \\beta_z \\frac{(S+I) Z}{N} - \\gamma_z Z\n\\]\nIn this model, the variables would have the following \ninterpretation:

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

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

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

    \n\nHere are the tasks to consider with this model\n
  4. \n \n\n\n
\n

 

\nShown below is sample sage code to solve a system of 3 ODEs \nand plot each component of the solution on a common axis.\n\n\n"}︡{"done":true}︡ ︠8cc2cd93-337e-4c0e-925a-7ff3cf11d9fds︠ # 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) ︡ff098aba-6766-4d6e-8fa0-c3dd0ff8db24︡{"file":{"filename":"/home/user/.sage/temp/project-578ca849-8aff-4a03-8cc8-0e985f103ac3/678/tmp_hGlHUg.svg","show":true,"text":null,"uuid":"60195bdd-071f-425c-aa78-b0b40c047b05"},"once":false}︡{"done":true}︡