The QtiPlot Handbook
Prev | Chapter 5. The Dialogs | Next

# The Fit Wizard

This dialog is activated by selecting the command Fit Wizard... from the Analysis Menu. This command is active if a plot or a table window is selected. In the latter case, this command first creates a new plot window using the list of selected columns in the table.

This dialog is used to fit discrete data points with a mathematical function. The fitting is done by minimizing the least square difference between the data points and the Y values of the function.

The top of the dialog box is used to choose a function among the one which are already define. Four types of functions are availables: the user defined functions which have been saved, the classical functions proposed by QtiPlot in the analysis menu, the simple elementary built-in functions, and external functions via pluggins.

To choose one of these functions, you just have to select it and to click on the checkbox under the selector.

If you want to define your own function, you can use the bottom half of the dialog box. You can write you own mathematical expression or add expressions obtained with the function selector. Then you need to define the parameters which have to be fitted in a comma separated list.

Figure 5-39. The first step of the Fit Wizard... dialog box.

This first step is used to define the function which will be used for the fitting

The second step is to define the parameters for the fit. You have to give initial guess for the fitting parameters.

Figure 5-40. The second step of the Fit Wizard... dialog box.

This second step is used to define the parameters of the fitting

In this second tab you can also choose a weighting method for your fit (the default is No weighting). The available weighting methods are:

1. Instrumental: the values of the associated error bars are used as weighting coeficients. You must add Y-error bars to the analysed curve before performing the fit.

2. Statistical: the weighting coeficients are calculated as the square-roots of each data point in the fitted curve.

3. Arbitrary Dataset: you have the possibility to set the weighting coeficients using an arbitrary data set. The column used for the weighting must have a number of rows equal to the number of points in the fitted curve.

After the fit, the log window is opened to show the results of the fitting process.

Depending on the settings in the Custom Output tab, a function curve (option Uniform X Function) or a new table (if you choose the option Same X as Fitting Data) will be created for each fit. The new table includes all the X and Y values used to compute and to plot the fitted function and is hidden by default, but it can be found and viewed with the project explorer.

Figure 5-41. The third step of the Fit Wizard... dialog box.

This third step is used to customize the output of a fitting operation.

This dialog tab provides controls that can be used to evaluate the goodness of fit. The first one is the Residuals Plot button which can be used to display the curve of the plot residuals. The Conf. Bands and Pred. Bands buttons can be used to generate confidence and prediction limits for the current fit, based on the user input confidence value.

After the fit, a series of fit statistics are displayed in the log window allowing to evaluate the goodness of fit. This values are:

1. Chi^2/doF
2. R-square
3. Adjusted R-square
4. RMSE (Root Mean Squared Error)
5. RSS (Residual Sum of Squares)

For detailed explanations about the meaning of this statistical values, please visit the following link.

By default, the reported errors are not automatically scaled with the square root of the reduced chi-squared value. You can choose to enable this option by checking the Scale errors with sqrt(Chi^2/doF) box.

Prev | Home | Next
Integrate dialog | Up | General Plot Options