I'm using the standard infection model on some data I am working with.
$ dS = -\beta SI $
$ dI = \beta SI - \gamma I $
$ dR = \gamma I $
Where $S$ is the number of susceptible subjects, $I$ is the infected, and $R$ is the recovered. I'm trying various methods for estimating the parameters $\beta$ and $\gamma$.
For any given discrete, fixed-width time period, I know the number of infected and the total population, which is fixed. One of the methods I have used to estimate the parameters is to feed the initial state into a differential equation solver in R and loop through several values for $\beta$ and $\gamma$ until they minimized the Mean Square Error.
To be thorough, I would like to do this using a least squares regression estimate of the parameters as well. Given that I know $I$, I can easily calculate $dI$ for each time period. However, I'm having trouble getting $S$ from my information.
One of my attempts assumed that all the infected from time $t-1$ moved to $R$ at time $t$ and that all infected at time $t$ had come from $S$. Therefore, $S$ was simply reduced by the number of infected each time period. I understood going into it that this was a risky assumption and the results were quite disappointing.
Any tips you have on how to find $S$ at each time period are greatly appreciated.
To be more clear, my goal is to do a regression on the equation
$$ dI = \beta (SI) + \gamma (-I) $$
to get the least squares estimates for $\beta$ and $\gamma$.