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
SET/FIT METHOD=CGNND PRINT=1 WEIGHT=S FUNCT=BLACBODY FCTDEF=USERdeclares 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 is BLACBODY, and that this BLACBODY function which contains user defined functions has already been built in the user area. The appendix or the MIDAS interactive HELP facility will give you the complete description of the SET/FIT command.
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
FIT/IMAGE 100,0.001 PROFILEexecuted after the preceeding SET/FIT, will execute a non-linear least squares approximation using the CGNND method. The program will stop if more than 100 computations of the approximating function have been performed or if the solution has been found with a precision of 10-3.