# 15.3.2.2 Settings Tab (Upper Panel)

See more related video:Selecting Data Range from Fitter

## Function Selection

Select a fitting function using the drop-down lists.

Category

Choose a function category. The default category is Origin Basic Functions.

Function

Choose a fitting function from the above Category. You may refer to the Curve Fitting Functions Reference to learn the details of each fitting function. Additionally for Surface Fitting, refer to Surface Fitting Functions.

• <New>: Open the Fitting Function Builder to build a new fitting function.
• <Search>: Open the Search and Insert Functions dialog to search an existing fitting function, you can add it into the fitting function dialog by double click the function name.
 Note: In order to help user add or search a function quickly, we also provide button New, Add and Search , which is a quick launch of the item , , , under the Function list conspicuously.
Iteration Algorithm Specify the iteration algorithm.

For the difference between these two algorithms, please refer to the comparison between ODR and L-M.

Description

Brief description of the function. This information is read only.

File Name(.FDF)

Corresponding FDF file of the function. This information is read only.

## Data Selection

Specify the input dataset and data modes.

Multi-Data Fit Mode
(only available with multiple range selections)

This control is available only when there is more than one input dataset.

• Independent Fit - Consolidated Report
The input datasets are fitted separately. The reports are consolidated into one sheet. See Fitting Multiple Curves Independently for more information.
• Independent Fit - Separate Report
The input datasets are fitted separately. The reports are output to different worksheets. See Fitting Multiple Curves Independently for more information.
 Note: After you select an Independent Fit from the Multi-Data Fit Mode drop-down menu, the Independent Fit Drop-Down List list will appear in the row of buttons across the middle of the dialog. Select a dataset from this drop-down menu, and then click the 1 Iteration or Fit Until Converged button to the left of the menu.
• Concatenate Fit
All input datasets are concatenated and fitted as one curve. Note that replicate data will not be combined before fitting but treated as individual data points. See Fitting with Replicate Data for more information.
• Global Fit
All datasets are fitted globally. This mode should be used when you want to fit one model to multiple datasets with shared parameters. See: Global Fitting with Parameter Sharing.
Weights

Specify the weighting method. If Use Each Range's Setting is selected, the weighting method in the y sub-branch of each Input Data branch will be used when each range is fitted. Otherwise, the weighting method will be applied on all the input ranges.

Input Data

Specify the input dataset(s). Since Origin 2020b, if you started from a graph window, you can click the arrow button after this box to select Use X Scale Range to apply the X scale range on the source graph to the input range.

Range
The XY data range.
Worksheet
Specify the worksheet name of the dataset in a workbook.
X
X column of the curve.
Y
Y column of the curve.
Weight
Weighting methods.
See: Fitting with Errors and Weighting
Rows
Specify a range of the X column to be fitted. When Rows is set to By Row or By X, you can use the From and To textboxes to specify the range to be fitted.
• All
Specify all rows of the dataset to be fitted.
• By Row
Specify the range of the X column by row index. Use To = 0 to specify "the last row" in the input data range.
• By X
Specify the range of the X column by X value.

## Find X/Y

Control output of Find Specific X/Y tables. A Find Y from X table is used to obtain a dependent variable value that corresponds to a given independent variable value. Use a Find X from Y table to obtain an independent variable value for a given dependent variable value.

Find X from Y Generate a Find X From Y table. Number of X Columns Specify the number of X columns. Generate a Find Y From X table. Number of Y Columns Specify the number of Y columns.
 Note: This branch is disabled for nonlinear implicit curve fitting.

## Find Z

This option is only available for surface fitting. Controls output of the Find Z from XY table. A Find Z from XY table is used to obtain a dependent variable value Z that corresponds to a set of given independent variable values X and Y.

Find Z from XY Use the checkbox to specify whether to generate a Find Z from XY table. Number of Z Columns Specify the number of Z columns.

Replica

Use these controls to fit your data to a built-in peak function by replicating the function for each peak, each of which may have different parameters. Your data should display multiple peaks of the same general form (e.g. Lorentzian or Gaussian) but with different centers or widths. If the function you have selected does not support replicas, this branch is disabled.

Number of Replicas
Specify the number of replicas. You must set the number to n-1, where n is the number of peaks you believe to be present in your data.
Peak Finding Settings
Settings related to peak finding.
Peak Finding Method for Nonlinear Curve Fit
Specifies the method to search peaks. Please see the Find Peaks page in the Peak Analyzer chapter for more details.
• Local Maximum
• Window Search
• 1st Derivative
• 2nd Derivative (search Hidden peaks)
• Residual after 1st Derivative (search Hidden peaks)
Local Points(%)
Only available when Local Maximum is selected in the Method drop-down list. Controls the number of points (local area) used for finding the peaks with the Local Maximum method.
Window Height(%)
Only available when Window Search is selected in the Method drop-down list. Controls the height of the rectangle used to find peaks. Edit the Height value in the text box.
Window Width(%)
Only available when Window Search is selected in the Method drop-down list. Controls the width of the rectangle used to find the peaks. Edit the Width value in the text box.

Peak Finding Method for Nonlinear Surface Fit
Specifies the method to search peaks.
• Local Maximum
• 1st Partial Derivative
• Contour Consolidation
Local Points
Controls the number of points in the X and Y directions (local area), used for finding peaks.

Peak Direction
Narrow the search for positive and/or negative peaks.
• Positive
Find positive peaks only.
• Negative
Find negative peaks only.
• Both
Find both positive and negative peaks.
Peak Min Height(%Y Scale)
Control the minimum height of the found peaks. For Nonlinear Surface Fit, the label will read Peak Min Height(%Z Scale).
Replicate From nth Parameter
Specify which parameters to use for fitting multiple peaks. For example, in a Gaussian function, the parameters are ordered y0, xc, w, and A. If set to 2, Origin will start with the second parameter when replicating. The first parameter will have only one value, so y0 will remain common for all replicas. Similarly, z0 would be common for surface peak replicas.
Number of Parameters Used in Replicas
The number of parameters used in replicas.
Plot Individual Peak Curve
Available for Nonlinear Curve Fit. Specify whether or not to plot the fitted curve for each individual peak.
Plot Cumulative Fitted Curve
Plot the cumulative fitted curve. Becomes available when Plot Individual Peak Curve is checked for Nonlinear Curve Fit. It will be checked (and non-editable) for Nonlinear Surface Fit.
See: Fitting Multiple Peaks with Replicas
Fit Control

Use this tree to control the fitting process.

Iterations
Control of iteration properties during fitting.
Max Number of Iterations
Specify the max number of iterations performed when the Fit button is clicked. If the Tolerance condition cannot be satisfied after the given maximum number of iterations are performed, user may press Fit again. The same number of iterations will be performed. This option prevents the fitting operation from running too long if each iteration is very slow (when data is large or when there are many parameters).
Tolerance
Specify the tolerance in this box. Fitting will be viewed as complete if the reduced chi-square between two successive iterations is less than the tolerance value. The tolerance is calculated by:
$Tolerance = \left | \frac{{\chi^2}'-\chi^2}{{\chi^2}'+\chi^2} \right |$
Where $\chi^2$ is the chi-square value of current iteration, and ${\chi^2}'$ is the chi-square of the last iteration. Note that a small chi-square tolerance does not necessarily mean that the fit is good. If the parameter space is “flat” (a particular combination of large variation of parameters could cause only a change of the chi-square value. This is similar to over-parameterization), then one cannot say that the fit is good even if the chi-square tolerance is satisfied.
Derivative Delta
This branch determines how the fitter computes the partial derivatives with respect to parameters for user-defined functions during the iterative procedure. This option is unavailable for built-in functions.
Note: You can define a user-defined function with partial derivatives.
For the user-defined functions, the derivative with respect to the parameter, p1, is computed as follows:
$derivative=[f(x,p_1+Delta,p_2,...)-f(x,p_1,p_2,...)]/Delta$ where $Delta$ is the increment.
Note: for simplicity, we suppose that the function has only one independent variable here.
Delta
The increment.
Minimum
Min value of the actual Delta. This text box is disabled when the Fixed check box is selected.
Maximum
Max value of the actual Delta. This text box is disabled when the Fixed check box is selected.
Fixed
Use fixed Delta value.
If the Fixed check box is selected, the value entered in the Delta text box will be used as the delta values for all the parameters.
If the Fixed check box is cleared, the actual value of Delta for a particular parameter will be equal to the product of the current value of the parameter and the value specified in the Delta text box. In this case, you can use the Maximum and Minimum text boxes to limit the actual Delta values in case a parameter value becomes too large or too small.
Note: It is not recommended that you select the Fixed check box when you start fitting your new function.
Parameters CI Computation Method
Use this list to select the method to compute the parameters confidence intervals:
• Asymptotic-Symmetry based
With the Asymptotic-Symmetry method, you will get asymptotic, symmetrical confidence intervals as calculated by a related equation.
• Model-Comparison based
If the Model-Comparison method is used, the upper and lower confidence limits will be calculated by comparing the residual sum of squares.
See: Theory of Nonlinear Curve Fitting.
Scale Error with sqrt(Reduced Chi-Sqr)
Available when fitting with weight. This check box only affects the error on the parameters reported from the fitting process, and does not affect the fitting process or the data in any way. It is enabled by default and the covariance matrix is calculated as: $\sigma^2(F'F)^{-1}$, otherwise, $(F'F)^{-1}$.
When it is checked, it Scale Error with sqrt reduced Chi-Sqr to estimate error variance, and parameter's standard error is scaled by it, otherwise error variance is specified with 1, and parameter's standard error is not scaled.
See also: Why parameter's standard error remains unchanged when error bar is scaled?
 This option is checked by default to keep parameter's standard error and related results compatible with other software. It is recommended to uncheck this option when fitting data with instrumental weight, so that parameter's standard error can reflect the magnitude of weight.
Invalid Weight Data Treatment
• Treat as Invalid
If there is invalid value in weight data, Origin will throw an error.
• Replace with Custom Value
Replace the Invalid Weight data with Custom Value
Custom Weight
Set the value of Custom Weight. This option is available when Replace with Custom Value is selected.
Quantities to Compute

Control the quantities to be computed and displayed.

Fit Parameters
Use this branch to specify what is output to the Fit Parameters table of the report sheet.
Unit
The unit for parameters. If you checked this check box, a column "Unit" will be added into the Parameters table of the result sheet. The units defined in the Derived Parameter Settings box of the Fitting Function Organizer dialog will be shown in this column.
Value
The parameter values.
Fixed
Fix a parameter value.
Standard Error
The standard error of each parameter.
LCL
The lower confidence limit. The LCL results will be calculated for both parameters and derived parameters if there is any.
UCL
The upper confidence limit. The UCL results will be calculated for both parameters and derived parameters if there is any.
Confidence level for Parameters (%)
The confidence level for regression. This control is available only when either LCL or UCL is checked.
t-Value
The t-test value of parameters.
Prob > |t|
The p-value of parameters.
Dependency
The dependency values for parameters.
Cl Half-Width
The half-widths of the confidence intervals.
Lower Bound
Minimum parameter value.
Upper Bound
Maximum parameter value.
Fit Statistics
Control output to the Fit Statistics table of the report sheet.
Number of Points
The total number of input data points.
Degrees of Freedom
Model degrees of freedom.
Reduced chi-Sqr
The reduced chi square value.
R Value
The R value, equal to the square root of $R^2$.
Residual Sum of Squares
The residual sum of squares (RSS), or the sum of square error.
R-Square (COD)
The coefficient of determination.
Root MSE(SD)
The residual standard deviation, or square root of mean square error.
Number of Iterations
The number of iterations required for the fit to run to completion.
Fit Status
Any fit status error code that is generated. You can see this Quick Help topic for details.
Number of Replicas
The number of replicas.
Replicas From nth Parameter
The index number of the starting parameter used to generate replicas.
Number of Parameters Used in Replicas
The number of parameters used to generate replicas.
Fit Summary
Control output of the fit summary table. When selected, options include Value, Standard Error, LCL, UCL, Adj.R-Square, R-Square(COD),Reduced Chi-Sqr.
ANOVA
Output the analysis of variance table.
Covariance Matrix
Output the covariance matrix.
Correlation Matrix
Output the correlation matrix.
Residue Analysis

Options for output of residuals. See: Graphic Residual Analysis

## Output

Use the Output Results To branch to control results output.