Fitting several functions simultaneously

General considerations

The basic version of QNFIT can fit systems of n equations in one variable, but some versions can also fit systems of n equations in several variables. If the same parameters do not occur in more than one of the equations, then the system will be uncoupled and corresponding elements of the covariance matrix will be zero. In such cases nothing is gained over fitting the functions independently to their respective data sets. More usually, some parameters will be present in more than one of the equations, and then the system will be coupled and more difficult to fit. Systems of differential equations are of this type, but they should be simulated and fitted using DEQSOL.

Simultaneous fitting of n independent functions of one variable

To do this you create a library file for the n separate data sets and an ASCII text model file with the n model equations. As with DEQSOL, you can denote missing data sets by a % in the corresponding line of the library file. To see how this all works you should practise with the library file provided called line3.tfl, and the model file line3.mod to fit 3 lines. A more interesting example is to use the data in consec3.tfl for consecutive irreversible chemical reactions as in

 
        A --> B --> C, A(0) > 0, B(0) = C(0) = 0 
        k(1) = p(1) > 0, k(2) = p(2) > 0, A(0) = p(3) > 0
and the model file consec3.mod, which illustrates how to code a model with a branch point, as in this case when k(1) = k(2).

Special considerations

A number of points should be noted when using multi-function mode. The data sets may not be checked for consistency or for the x-values being in increasing order. You cannot edit the data interactively since QNFIT makes a look up table for distinct values which are then used to build up predicted values in an economical way. For goodness of fit, a long table with all the sequential values is constructed, and this should be kept in mind when interpreting runs tests. You can read starting parameters and limits from data files as in EXPERT mode but the

              begin{limits} ... end{limits}
section must be at the end of the first data file referenced by the library file. You can still supply a parameter limits file with three columns (lower-limit, starting values and upper limits) just as with any single models.

Back to Help Menu or End Help