Skip to content

Fit a Kendrick model to data

Serge Stinckwich edited this page Mar 1, 2019 · 16 revisions

We give here an example on how to use an external script language like Octave (or Matlab) to fit a KENDRICK model to some data. In order to do that, we adapt the Matlab script provided by Martcheva, Maia in the book: An Introduction to Mathematical Epidemiology

Data are taken from “Influenza in a Boarding School,” British Medical Journal, 4 March 1978: https://rdrr.io/cran/outbreaks/man/influenza_england_1978_school.html we transform them in order to have 2 columns with days, number of infected

We use SIR model described page 126 of the Marcheva book:

S'(t) = - beta S(t) I(t) I'(t) = beta S(t) I(t) - alpha I(t)

Parameters of the simulation: I(3) = 25 S(3) = 763 - I(3) = 738 Population size = 763

alpha and beta parameters are pre-estimated as following: alpha = 0.3 beta = 0.0025

KENDRICK model:

KendrickModel influenza_england_1978_school
	attribute: #(status -> S I R);
	parameters: #(alpha beta lambda);
	transitions: #(
		S -- lambda --> I.
		I -- alpha --> R.
	);
	lambda: #(beta*I).

Composition influenza_england_1978_school_comp
    model: 'influenza_england_1978_school'.

Scenario influenza_england_1978_school_scenario
    on: 'influenza_england_1978_school_comp';
    populationSize: 763;
    S: 738;
    I: 25;
    alpha: 0.3;
    beta: 0.0025;
    others: 0.

Simulation influenza_england_1978_school_sim rungeKutta
	scenarios: #(influenza_england_1978_school_scenario);
	from: 3.0; 
	to: 14.0; 
	step: 1;
	init;
	execute;
	timeSeriesOutputsAt: '{#status:#I}'

Found values of alpha and beta parameters are : alpha = 4.650167844591154e-01 beta = 2.384159011374087e-03

Custom sidebar of the Kendrick Wiki

Basic-SIR

SIR---Metapopulation

Clone this wiki locally