Parameter fit

The dialog Parameter fit is used to perform parameter fits of one function (or more functions depending on the same set of parameters in case of multidimensional fits) to the same number of data sets. The dialog is shown when either Fit is selected from the Edit menu, or when a data file is loaded and the options Autofit in the Basic settings and Show dialog in the Autofit settings both are activated.

Initial values for the parameters may be entered in the corresponding fields. When the dialog is opened, the fields are initialized with the current parameter set of the function (in case of multidimensional fits with that of the first function in the list of selected functions). By checking the boxes left to the entry fields the parameters are chosen to be fitted, otherwise their values are kept constant. In case of general linear least square fits no initial values need to be entered for the parameters chosen to be fitted. The estimated standard deviations of the parameter are displayed right to the corresponding entry fields.

The buttons Load and Save are used to load and save the current parameter set from or to text files, respectively. Differing to the format used in the other parameter setting dialogs, here a second column containing the estimated standard deviations of the parameters is saved, too.

When the box Nonlinear fit is checked, nonlinear parameter fits by employing the iterative Levenberg-Marquardt method will be performed. Otherwise noniterative general linear least square parameter fits are selected. In this case the function must depend linearly on all parameters chosen to be fitted.

In the group Data errors the settings for weighing the data points may be formed. The selected Array for which the settings are performed is shown by its filename and the column indices for x, y, and errors. In case of multidimensional fits the array can be selected with a spin box showing its index within the list of arrays. Then the settings can be performed individually for each array.

When the box Error column is checked, the corresponding column of the data set, selected in the dialog  Array, is used as the standard deviation of the y values for calculation of chi-square. Otherwise the standard deviation will be estimated by an error model function taking the x or the y value as its argument. This function and their parameters may be selected in a dialog which is displayed by clicking Model. A simple error model might be selected by choosing a polynomial with p1 = 0.01, resulting in standard deviations of 1 %.

Termination of the iterative nonlinear parameter fit algorithm may be controlled by setting a Maximum iterations number and a Tolerance value. Fitting is terminated when either the maximum number of iterations is reached or the relative errors of chi-square or of the parameters have decreased down to the tolerance value.

The fit is started by clicking the Start button. Progress of the chi-square values during the iterations is displayed in the listbox in the lower part of the dialog. Fitting can be terminated by use of the button  Cancel. At the end the termination reason is displayed as well as the average deviation of the y values, the number of the degrees of freedom nu, and the significance Q, giving the probability that chi-square should exceed the achieved value. The matrix of the resulting parameter correlation coefficients is displayed by use of the button Correlations.

The residuals of the fit (the differences between data and function values) can be plotted graphically by use of the button Residuals. The plot displayed in a new window then can be printed and saved as a new plot file with the residual data stored internally.

The dialog may be canceled without saving the parameters by use of the button Cancel. By using Apply the parameters are saved without closing the dialog. With OK the parameters are saved and the dialog is closed. In case of multidimensional fits then the parameters of each selected function will be actualized.