Wednesday, May 13, 2020

A Sample Influenza Curve Fit


  A curve fit can be somewhat challenging if you don't have a formula to actually fit to your data but it's not impossible if you have a set of differential equations that model the process. I've worked out a procedure that gives fairly good results for the SIR epidemic model and applied it to the 1978 English boys school influenza epidemic found in Murray, Mathematical Biology. The set of equations are shown in the following image along with an integrated expression for the number of infected, I, as a function of the unknown number of susceptibles, S. The 3rd compartment for the SIR model is the number of removed individuals, R, but we will not need that.


Given assumed initial values for I and S one can compute successive values using a simple numerical integration procedure. A first order calculation appears to be sufficient if the step size is small enough. I tried a second order term to help get past the peak but it didn't make much difference in the results.

The data used for the fit was obtained with the aid of verinier calipers to measure the height of the data points in the figure found in Murray's book.


The small step size chosen required about 600 iterations for the numerical integration to cover the range of the data. The fits were evaluated by comparing the rms errors of the fits and values for the set of parameters of the model were chosen by trial and error to obtain the smallest rms error.




Here's a plot showing a comparison of the fit with the data along with a comparison of the values of I(S) for both the numerical integration and the formula which was used as a check on the accuracy of the numerical integration.



Some other plots are also useful.




Supplemental (May 15): The 2nd plot from the end should be labeled I(S).

No comments:

Post a Comment