[Math] Fitting Lotka-Volterra equation with unknown constants to data

math-software

I'm trying to model a predator-prey interaction scenario given 100 years worth of data. I have no idea what the constants are and have been told to guess until I get a solution that is approximately correct, however this is proving fruitless and I'm sure there is an easier way to do it, I'm guessing with curve fitting. I've searched but haven't found anything yet.

Has anyone any suggestions on software using to solve unknown constants in differential equations given a dataset? (Preferably linux compatible). Failing that, any better suggestions as to how to find the constants.

Best Answer

I once helped someone do something very similar in Matlab for chemostat models. The principle was the following:

Solve the equations for initial conditions (normally the data points at instant 0) using an ODE solver (ode45). From this, construct an error function, for instance, the quadratic deviation of your data from the solutions you just obtained. This error function will depend on the parameters of the model.

Now use this error function as the input for the fmincon function, which lets you look for the optimal fit over some parameter range, i.e. the parameter choice that leads to a solution minimizing the error function. (So, the method is just a least squares method.)

That's how it worked in principle. I'll try to look up the matlab files I used for that.

Related Question