4/14/2019
Topics Covered:
Euler's method for approximation
Curve fitting
Relating Model Parameters to Data
Defining the "contact" coefficients
Tools/Resources used:
MATLAB
Duke University's SIR guide
Keeling and Rohani's Modeling Infectious Diseases In Humans and Animal
This past week, I was able to finally apply some of the resources and tools I have acquired to make progress on intuitively understanding the SIR model for infectious diseases. After understanding how the model is broken down mathematically, I needed to understand how the system of ODEs (ordinary differential equations) interacted with each other.
There are many ways to solve systems of ODEs, i.e. laplace, eigenvalues, matrix manipulation, etc. For the purpose of approximating the solutions to these differential equations at given times, we will be using Euler's method. In fact, Euler's method is simple and direct. It involves relating the slope to the step size. Unfortunately, it can be inaccurate and numerically unstable.
Recall, the equations were
ds/dt = -bs(t)i(t)
dr/dt = ki(t)
di/dt = bs(t)i(t) - ki(t)
so Euler's approximation becomes
s(n) = s(n-1) - bs(n-1) i(n-1) delta t
i(n) = i(n-1) + (bs(n-1)i(n-1) - ki(n-1)) delta t
r(n) = r(n-1) + ki(n-1) delta t
given an initial condition for s, i and r, as well as an explicit constant for b and k, I now have a way to approximate my solutions and plot a curve using any computer modeling system. I was able to do this on both excel and MATlab. The key is to use as small a step as possible, because larger steps will end up grossly inaccurate. The picture provided shows a step size of .1, which still looks a bit inaccurate.
Now that an understanding of approximating our systems have been established, we must consider the other missing pieces. Our system of ODEs can not be solved without an explicit "k" or "b" constant. The question is, how to obtain them.
Turns out, these constants can be approximated by observation. the constant "k" can be approximated as the inverse of the number of days an individual is infected.
Indirectly, there is a ratio of b to k, such that b/k = c, or the contact number. However, the following method can only be determined after the epidemic has run it's course. The equation used to find c is independent of time, because we approximate using value where t=0 and t=infinity (where the solution has reached a steady state)
One goal of my research is to determine and utilize other methods to either a) determine an alternative for calculating the "b" constant, b) use a method such as probability theory to determine a highly likely steady state, so that a "b" constant can be determined at t=infinity, or c) determine a nonlinear solution that would provide me a means to determine my "b" constant.
Euler's method for approximation
Curve fitting
Relating Model Parameters to Data
Defining the "contact" coefficients
Tools/Resources used:
MATLAB
Duke University's SIR guide
Keeling and Rohani's Modeling Infectious Diseases In Humans and Animal
This past week, I was able to finally apply some of the resources and tools I have acquired to make progress on intuitively understanding the SIR model for infectious diseases. After understanding how the model is broken down mathematically, I needed to understand how the system of ODEs (ordinary differential equations) interacted with each other.
There are many ways to solve systems of ODEs, i.e. laplace, eigenvalues, matrix manipulation, etc. For the purpose of approximating the solutions to these differential equations at given times, we will be using Euler's method. In fact, Euler's method is simple and direct. It involves relating the slope to the step size. Unfortunately, it can be inaccurate and numerically unstable.
Recall, the equations were
ds/dt = -bs(t)i(t)
dr/dt = ki(t)
di/dt = bs(t)i(t) - ki(t)
so Euler's approximation becomes
s(n) = s(n-1) - bs(n-1) i(n-1) delta t
i(n) = i(n-1) + (bs(n-1)i(n-1) - ki(n-1)) delta t
r(n) = r(n-1) + ki(n-1) delta t
given an initial condition for s, i and r, as well as an explicit constant for b and k, I now have a way to approximate my solutions and plot a curve using any computer modeling system. I was able to do this on both excel and MATlab. The key is to use as small a step as possible, because larger steps will end up grossly inaccurate. The picture provided shows a step size of .1, which still looks a bit inaccurate.
Now that an understanding of approximating our systems have been established, we must consider the other missing pieces. Our system of ODEs can not be solved without an explicit "k" or "b" constant. The question is, how to obtain them.
Turns out, these constants can be approximated by observation. the constant "k" can be approximated as the inverse of the number of days an individual is infected.
Indirectly, there is a ratio of b to k, such that b/k = c, or the contact number. However, the following method can only be determined after the epidemic has run it's course. The equation used to find c is independent of time, because we approximate using value where t=0 and t=infinity (where the solution has reached a steady state)
One goal of my research is to determine and utilize other methods to either a) determine an alternative for calculating the "b" constant, b) use a method such as probability theory to determine a highly likely steady state, so that a "b" constant can be determined at t=infinity, or c) determine a nonlinear solution that would provide me a means to determine my "b" constant.
Wow, this is some really fascinating stuff, Thank you.
ReplyDelete