Scaling type-epidemiological models

J.-C. Cortes, M. Ehrhardt, A. Sanchez-Sanchez, F.-J. Santonja and R.-J. Villanueva

March 11th, 2013

In this website, we are going to explain how to scale a
type-epidemiological model. Scaling is useful when summing the model
equations no simple demographic models can be obtained because
the total population varies its size over the time. For instance,
suppose we want to study the transmission dynamics of a disease or
unhealthy habit where infected people die at a higher rate than healthy
(susceptible) people [4]. Other examples can be found in [1, 2, 3, 4].

Now, we are going to show, step by step, how to build and scale a model for the dynamics of the students academic performance in the German region of North Rhine-Westphalia using epiModel [5, 6] and a procedure implemented with Mathematica [7] to scale models generated by epiModel following the techniques proposed in [1, 2].

Students are divided into level 11, 12 and 13, also into boys and girls
and into people who promote and students who do not promote. The model
dynamics can be summarized in the following figure.

The file “ModelDefinition” required by epiModel is the following

`(* Academic performance. German model *) `

(* No. of age groups *)

\[NTilde] = 3;

(* Subpopulations *)

SP = {

{1, "Girls who promote"},

{2, "Girls who do not promote" },

{3, "Boys who promote" },

{4, " Boys who do not promote" }

};

(* Model independent terms *)

TI = {

{ \[Sigma]1, 1, {}, {1}, True, "New girls entering"},

{ \[Sigma]2, 1, {}, {3}, True, "New boys entering"}

};

(* Model linear term *)

LIN = {

{ cP1, 4, {1}, { }, True, "Girls who promote next level"},

{ cP2, 4, {3}, { }, True, "Boys who promote next level"},

{ \[Eta]1, 2, {2}, { }, True, "Girls who give up High School”},

{ \[Eta]2, 2, {4}, { }, True, "Boys who give up High School"},

{ \[Alpha]1, 3, {1}, {2}, True, "Promote->Do not promote. Girls autonomous decission"},

{ \[Alpha]2, 3, {3}, {4}, True, "Promote->Do not promote. Boys autonomous decission"},

{ \[Gamma]1, 3, {2}, {1}, True, "Do not Promote->Promote. Girls autonomous decission"},

{ \[Gamma]2, 3, {4}, {3}, True, "Do not Promote->Promote. Boys autonomous decission"}

};

(* Model non-linear terms *)

NOLIN = {

{\[Beta]1, {1,2,3,4}, {1}, {2}, True, "Girls' negative transmission rate"},

{\[Beta]2, {1,2,3,4}, {3}, {4}, True, "Boys' negative transmission rate"},

{\[Delta]1, {1,2,3,4},{2}, {1}, True, "Girls' positive transmission rate"},

{\[Delta]2, {1,2,3,4},{4}, {3}, True, "Boys' positive transmission rate"}

};

Print["Description loaded"];

The resulting model can be seen downloading the text file generated by
epiModel from this link or a PDF file from this link. The
correspondence of model functions with those subpopulations in the
above figure are

• x[1, 1], x[2, 1],
x[3, 1], x[4, 1], are the promoting girls, non promoting girls,
promoting boys and non promoting boys of level 11, respectively.

• x[1, 2], x[2, 2], x[3, 2], x[4, 2], are the promoting girls, non promoting girls, promoting boys and non promoting boys of level 12, respectively.

• x[1, 3], x[2, 3], x[3, 3], x[4, 3], are the promoting girls, non promoting girls, promoting boys and non promoting boys of level 13, respectively.

The next step consists of the model scaling. Then, we implemented a code in Mathematica based on the papers [1, 2] which code can be downloaded from this link and seen in the following.

• x[1, 2], x[2, 2], x[3, 2], x[4, 2], are the promoting girls, non promoting girls, promoting boys and non promoting boys of level 12, respectively.

• x[1, 3], x[2, 3], x[3, 3], x[4, 3], are the promoting girls, non promoting girls, promoting boys and non promoting boys of level 13, respectively.

The next step consists of the model scaling. Then, we implemented a code in Mathematica based on the papers [1, 2] which code can be downloaded from this link and seen in the following.

`(* Reading the 'Model.data file generated by epiModel. `

The model is in the variable 'eqns' *)

Get[ "Model.data" ];

(* The first half of 'eqns' are the equations and the second, the initial conditions *)

nEq = Length[ eqns ] / 2;

(* We take the right members of each equation ... *)

derecha = eqns[[ 1;;nEq, 2]];

(* ... and sum all of them. The resulting term is the derivative of the total population. *)

derPobTotal = FullSimplify[ Total[ derecha ] ];

(* REPLACEMENT TERMS *)

(* New scaled functions 'y' *)

rFinal = { x -> y };

Yvars = vars /. rFinal;

(* Derivatives: left members *)

rIzq = MapThread[ #1'[t] -> #2'[t] + #2[t] * derPobTotal &, { vars, Yvars } ];

(* We do the replacements *)

eq = eqns /. rIzq /. rFinal;

(* Now, we write to the file 'Model.scaled' the following variables

* eqns -> scaled model

* Fvars -> scaled functions with [t]

* vars -> scaled functions without [t]

*)

eqns = eq;

Fvars = Map[ #[t] &, Yvars ];

vars = Yvars;

Save[ "Model.scaled", { eqns, Fvars, vars } ];

Exit[];

The resulting scaled model can be seen downloading the text file generated by epiModel from this link or a PDF file from this link. The correspondence of the scaled model functions is the same as above, changing 'x' by 'y'.

REFERENCES

REFERENCES

- Martcheva, M., Castillo-Chavez, C., 2003. Diseases with chronic stage in a population with varying size. Mathematical Biosciences 182 (1) 1 – 25.
- Mena-Lorca, J., Hethcote, H.W., 1992. Dynamic models of infectious diseases as regulators of population sizes. Journal of Mathematical Biology 30, 693-716.
- Emilio Sanchez, Rafael-Jacinto Villanueva, Francisco-Jose Santonja, & Maria Rubio, Predicting cocaine consumption in Spain: A mathematical modelling approach, Drugs: education, prevention and policy, April 2011; 18(2): 108-115.
- Francisco Guerrero, Francisco-José Santonja, Rafael-Jacinto Villanueva, Analysing the Spanish smoke-free legislation of 2006: A new method to quantify its impact using a dynamic model, International Journal of Drug Policy, Volume 22, Issue 4, July 2011, Pages 247-251.
- Juan-C. Cortés, Almudena Sánchez-Sánchez, Francisco-J. Santonja, Rafael-J. Villanueva, epiModel: A system to build automatically systems of differential equations of compartmental type-epidemiological models, Computers in Biology and Medicine, Volume 41, Issue 11, November 2011, Pages 999-1005.
- epiModel, http://epimodel.imm.upv.es
- Mathematica, http://www.wolfram.com/mathematica/