# Curve fitting

Curve fitting hints

This is a very difficult subject and should only be considered by experienced users who really understand the mathematics of the model and are fully aware of any singularities and bifurcations.

If it is at all possible you should refrain from fitting the inital conditions as parameters, or at least constrain them to stay within a narrow range, as inaccurate initial conditions introduce many complications.
Fitting will only be succesful if you have extensive accurate data, the correct model, and good starting estimates.
Consider these hints.

1. If you only have a single equation you may find that program QNFIT gives you more control over the fitting and offers more options for plotting and goodness of fit.
2. Create a library file (like deqsol.tfl) to facilitate the choice of parameter starting estimates and limits.
3. Try to fix the initial conditions y0(i), or only vary these within a narrow range if it is absolutely necessary.
4. As the integration always starts at x = 0 and assumes that the y0(i) refer to y(i) at x = 0, you should try to obtain some data close to x = 0 if at all possible.
5. After choosing starting estimates, integrate and overlay to make sure a sensible starting position is being employed.
6. Do not estimate the covariance matrix unless you are sure that the parameter standard errors are going to be helpful.
   The estimation can be time consuming, and standard errors are not very accurate and are seldom very useful.
7. If you pick random fitting, DEQSOL generates pseudo random normal, or uniform, numbers between parameter limits, and it will only overwrite the current parameters if a solution is found with a smaller objective function.
   This technique should be used sparingly, with narrow parameter limits, and then only if you suspect that a local minimum is being detected.
8. If you use a single fitting you will be able to observe the progress of optimisation, but if you choose random fitting then only the final results will be displayed.

Back to Help Menu or End Help