Parameter Identification and SIR Epidemic Model.



Similar documents
Cooling and Euler's Method

System of First Order Differential Equations

Simple epidemic models

x = + x 2 + x

2.3. Finding polynomial functions. An Introduction:

Method To Solve Linear, Polynomial, or Absolute Value Inequalities:

March 29, S4.4 Theorems about Zeros of Polynomial Functions

1 Review of Least Squares Solutions to Overdetermined Systems

Linearly Independent Sets and Linearly Dependent Sets

Zeros of Polynomial Functions

Machine Learning and Data Mining. Regression Problem. (adapted from) Prof. Alexander Ihler

Second Order Linear Nonhomogeneous Differential Equations; Method of Undetermined Coefficients. y + p(t) y + q(t) y = g(t), g(t) 0.

Using Real Data in an SIR Model

Confidence Intervals for One Standard Deviation Using Standard Deviation

The Method of Least Squares. Lectures INF2320 p. 1/80

Scicos is a Scilab toolbox included in the Scilab package. The Scicos editor can be opened by the scicos command

f(x) = g(x), if x A h(x), if x B.

This means there are two equilibrium solutions 0 and K. dx = rx(1 x). x(1 x) dt = r

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial VI

Definition 8.1 Two inequalities are equivalent if they have the same solution set. Add or Subtract the same value on both sides of the inequality.

Matlab Practical: Solving Differential Equations

3.1 Solving Systems Using Tables and Graphs

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

Zeros of a Polynomial Function

Zeros of Polynomial Functions

Math 132. Population Growth: the World

3.3. Solving Polynomial Equations. Introduction. Prerequisites. Learning Outcomes

Pre-Algebra Academic Content Standards Grade Eight Ohio. Number, Number Sense and Operations Standard. Number and Number Systems

Student Performance Q&A:

Algebra Academic Content Standards Grade Eight and Grade Nine Ohio. Grade Eight. Number, Number Sense and Operations Standard

Chapter 2: Linear Equations and Inequalities Lecture notes Math 1010

Curve Fitting, Loglog Plots, and Semilog Plots 1

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 10

CORRELATED TO THE SOUTH CAROLINA COLLEGE AND CAREER-READY FOUNDATIONS IN ALGEBRA

NUMERICAL METHODS TOPICS FOR RESEARCH PAPERS

Calculator Notes for the TI-Nspire and TI-Nspire CAS

GINI-Coefficient and GOZINTO-Graph (Workshop) (Two economic applications of secondary school mathematics)

Numerical Methods for Differential Equations

Operation Count; Numerical Linear Algebra

3.2 Sources, Sinks, Saddles, and Spirals

Algebra 1 Course Title

Curve Fitting and Parameter Estimation

This unit will lay the groundwork for later units where the students will extend this knowledge to quadratic and exponential functions.

8. Linear least-squares

Algebra Unpacked Content For the new Common Core standards that will be effective in all North Carolina schools in the school year.

Trend and Seasonal Components

Lecture 3: DC Analysis of Diode Circuits.

Introduction to Engineering System Dynamics

South Carolina College- and Career-Ready (SCCCR) Algebra 1

What are the place values to the left of the decimal point and their associated powers of ten?

Numerical Methods in MATLAB

Modeling and Simulation of a Three Degree of Freedom Longitudinal Aero plane System. Figure 1: Boeing 777 and example of a two engine business jet

Higher Order Equations

The degree of a polynomial function is equal to the highest exponent found on the independent variables.

Algebra I Credit Recovery

1 Finite difference example: 1D implicit heat equation

Confidence Intervals for the Difference Between Two Means

Introduction to Finite Difference Methods

First, we show how to use known design specifications to determine filter order and 3dB cut-off

Introduction to MATLAB IAP 2008

Solving ODEs in Matlab. BP205 M.Tremont

SOLVING LINEAR SYSTEMS

Business Statistics. Successful completion of Introductory and/or Intermediate Algebra courses is recommended before taking Business Statistics.

Mesh Discretization Error and Criteria for Accuracy of Finite Element Solutions

Statistics in Retail Finance. Chapter 6: Behavioural models

Spline Toolbox Release Notes

Introduction to time series analysis

Manufacturing Equipment Modeling

A three point formula for finding roots of equations by the method of least squares

The Time Constant of an RC Circuit

Fairfield Public Schools

Indiana State Core Curriculum Standards updated 2009 Algebra I

the points are called control points approximating curve

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Module 1, Lesson 3 Temperature vs. resistance characteristics of a thermistor. Teacher. 45 minutes

VIRAL MARKETING. Teacher s Guide Getting Started. Benjamin Dickman Brookline, MA

is the degree of the polynomial and is the leading coefficient.

MATLAB Functions. function [Out_1,Out_2,,Out_N] = function_name(in_1,in_2,,in_m)

4.3 Lagrange Approximation

The Method of Partial Fractions Math 121 Calculus II Spring 2015

Chapter 4 One Dimensional Kinematics

OPTIMAl PREMIUM CONTROl IN A NON-liFE INSURANCE BUSINESS

Mathematics Online Instructional Materials Correlation to the 2009 Algebra I Standards of Learning and Curriculum Framework

Algebra Cheat Sheets

by the matrix A results in a vector which is a reflection of the given

Partial Fractions: Undetermined Coefficients

Chapter 3 Section 6 Lesson Polynomials

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

Unit 3: Day 2: Factoring Polynomial Expressions

ANALYSIS OF TREND CHAPTER 5

Course Text. Required Computing Software. Course Description. Course Objectives. StraighterLine. Business Statistics

Improved Differential Fault Attack on MICKEY 2.0

ORTHOGONAL POLYNOMIAL CONTRASTS INDIVIDUAL DF COMPARISONS: EQUALLY SPACED TREATMENTS

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example.

Trigonometric Functions and Equations

Assessment Schedule 2013

Lecture Notes on Polynomials

Transcription:

Parameter Identification and SIR Epidemic Model. In this lesson we consider the development of an epidemic, which is similar to measles. The population will be partitioned into three disjoint groups of susceptible, infected and recovered. One would like to precisely determine what parameters would control or prevent the epidemic. The populations will be modeled by three differential equations. The Matlab command ode45 can be used to solve such systems of differential equations. Make the following basic assumptions. Assume the population is a disjoint union susceptible infected recovered = S(t), = I(t) and = R(t). So, the total population = S(t) + I(t) + R(t). Assume all infected eventually recover. Assume all recovered are not susceptible. Assume the increase in the infected is proportional to the change in time, the number of infected and the number of susceptible. The change in the infected population will increase from the susceptible group and will decrease into the recovered group. I(t+ t) I(t) = t a S(t) I(t) - t b I(t) where a reflects how contagious or infectious the epidemic is and b reflects the rate of recovery. Now divide by t and let it go to zero to get the differential equation for I, I' = a S I b I. The differential equations for S and R are obtained in a similar way.

2 SIR Epidemic Model: S' = -a S I S(0) = S o and a = contagious constant I' = a S I b I I(0) = I o and b = recovery constant R' = b I,R(0) = R 0. Note, (S + I + R)' = S' + I' + R' = 0 so that S + I + R = constant and S(0) + I(0) + R(0) = S o + I o + R 0. Note, I'(0) = (a S(0) b) I(0) > 0 if and only if a S(0) b > 0 and I(0) > 0. The Matlab command ode45 is used to appoximate the solution of our system of differential equation. This command is a robust implementation for systems of differential equations, which uses a variable step size method and the fourth and fifth order Runge-Kutta method. Since there are three unknowns and three differential equations and we wish to use Matlab's ode45 scheme, the file, ypsir.m, must contain the three right sides of the differential equations where y(1) = S, y(2) = I and y(3) = R. The choice of a and b in ypsir.m will determine whether or not the I(t) will increase; if I'(0) = (a S(0) b) I(0) > 0, then I(t) will increase. The sir.m file contains the call to ode45 and the graphs of the three population groups are generated by the Matlab command plot. The initial populations are S(0) = 99, I(0) = 1 and R(0) = 0.

3 m-files ypsir.m m-files sir.m. function ypsir =ypsir(t,y) a =.01; b =.1; ypsir(1) =-a*y(1)*y(2); ypsir(2) = a*y(1)*y(2)-b*y(2); ypsir(3) = b*y(2); ypsir = [ypsir(1) ypsir(2) ypsir(3)]'; your name, your student number, lesson number clear; to = 0; tf =50; yo = [99 1 0]; [t y] = ode45('ypsir',[to tf],yo); plot(t,y(:,1),t,y(:,2),t,y(:,3)) title('your name, your student number, lesson number') xlabel('time') ylabel('susceptible, infected, recovered' 100 your name, your student number, lesson number 90 80 susceptible, infected, recovered 70 60 50 40 30 20 10 0 0 5 10 15 20 25 30 35 40 45 50 time Note, the three populations versus time give the output. Also the steady state populations are indicated by the right side of the graph where the three curves level off, that is, where the derivatives all approach zero.

4 The following code identifies the contagious and recovery parameters, a and b, from several observations of the percentage of infected and recovered in the populations. The system of differential equations is discretized to form an over-determined algebraic system. The least squares method is used to approximate the two parameters. The Matlab code sir_parid.m is as follows and lists the two subroutines sirid() and ypsirid(): Matlab code sir_parid.m: This code uses least squares to identify two parameters in the SIR model: S_t = -asi; I_t = asi - bi; R_t = bi where a = "contagious" coefficient and b = "recovery" coefficient. The data is given in the vectors Sd, Id and Rd, and they are adjusted by a random variable. The data is used in the finite difference approximation of the above: (S_i+1 - S_i-1)/(2 dt) = -a S_i I_i (I_i+1 - I_i-1)/(2 dt) = a S_i I_i - b I_i and (R_i+1 - R_i-1)/(2 dt) = b I_i. Least squares is used to compute the linear polynomial coefficients. The first six data points are used. function [t y] = sirid global olda oldb yo = [99 1 0]; to = 0; tf = 50; [t y] = ode45('ypsirid',[to tf],yo); function ypsirid = ypsirid(t,y) global olda oldb ypsirid(1) = -olda*y(1)*y(2); ypsirid(2) = olda*y(1)*y(2) - oldb*y(2); ypsirid(3) = oldb*y(2); ypsirid = [ypsirid(1) ypsirid(2) ypsirid(3)]'; clear; clf(figure(1)) global olda oldb olda = 0.010; oldb = 0.100; td = [0.00 1.077 2.136 3.092 4.171 5.372 6.695 8.020 9.015... 10.293 11.271 15.039 20.590]; Sd = [99.0 97.2 92.9 84.8 68.1 42.8 20.0 8.3 4.3 2.0 1.1 0.2 0.04]; Id = [1.00 2.59 6.39 13.65 28.20 48.76 64.00 66.93 64.38... 58.85 54.15 37.88 21.85]; Rd = [0.00 0.28 0.63 1.55 3.74 8.37 15.97 24.76 31.30 39.19... 44.72 61.92 78.11]; numdata = 13; rvec = rand(1,numdata); Id(2:numdata) = Id(2:numdata) +.1*rvec(1,2:numdata) -.05;

rvec = rand(1,numdata); Rd(2:numdata) = Rd(2:numdata) +.1*rvec(1,2:numdata) -.05; Sd = 100 - Id - Rd; for i = 2:1:numdata-1 ii = (i-1)*3; d(ii) = (Sd(i+1) - Sd(i-1))/(td(i+1) - td(i-1)); d(ii+1) = (Id(i+1) - Id(i-1))/(td(i+1) - td(i-1)); d(ii+2) = (Rd(i+1) - Rd(i-1))/(td(i+1) - td(i-1)); A(ii,1) = -Sd(i)*Id(i); A(ii,2) = 0; A(ii+1,1)= Sd(i)*Id(i); A(ii+1,2) = -Id(i); A(ii+2,1)= 0.0; A(ii+2,2) = Id(i); end meas = 6; m = 3*meas + 1; x = A(2:m,:)\d(2:m)'; [olda oldb] [x(1) x(2)] plot(td(1:1:meas+1),sd(1:1:meas+1),'*',td(1:1:meas+1),id(1:1:meas+1),'o',... td(1:1:meas+1),rd(1:1:meas+1),'s',td,sd,'x',td,id,'x',td,rd,'x') olda = x(1); oldb = x(2); [t y] = sirid; hold on plot(t, y(:,1), 'b',t, y(:,2), 'g',t,y(:,3), 'r') 5

6 Use five measured data points: >> sir_parid 0.0100 0.1000 0.0096 0.1112 100 90 80 70 60 50 40 30 20 10 0 0 5 10 15 20 25 30 35 40 45 50

7 Use six measured data points: >> sir_parid 0.0100 0.1000 0.0096 0.0986 100 80 60 40 20 0-20 0 5 10 15 20 25 30 35 40 45 50