The Fitting Process.

The typical sequence of operations for a FITting
process would be first to create the approximating function, to choose
relatively to your problem and your needs the `FIT` options, then
to execute the real least squares approximation and finally to store
and view the results. This corresponds to the typical sequence of
MIDAS instructions :

EDIT/FIT fitname

SET/FIT options

FIT/... nfeval,prec image (or table and cols)

COMPUTE/FIT output

The commands have been designed so that defaults exists for almost all the parameters, (see description in Volume C of the MIDAS User Guide).

`EDIT/FIT` has been described in the last section.

The MIDAS command `SET/FIT` is used
to specify the different options of the `FIT` command, for
instance the method to be applied or the type of used functions.
The instruction

declares that the Corrected Gauss-Newton no derivatives method is to be applied, that at each iteration, a display of the intermediate result will be performed, that the weighting factors are statistical, that the name of the approximating function isSET/FIT METHOD=CGNND PRINT=1 WEIGHT=S FUNCT=BLACBODY FCTDEF=USER

The command `SHOW/FIT` displays the actual selected `FIT` options.

The `FIT` instruction is performing the least squares approximation
itself. It has a slightly different syntax if the fitting concerns
a table or an image.

FIT/TABLE nfeval[,prec,[metpar]] table :depcol[,:wgt] :indcol,...

FIT/IMAGE nfeval[,prec,[metpar]] image

`nfeval` is the maximum number of function evaluations that can be
performed, `prec` is the precision on the parameters
i.e. the program stops if

and

executed after the preceedingFIT/IMAGE 100,0.001 PROFILE