# 15.2.1 The Linear Regression Dialog Box

The Linear Regression dialog can be used to fit the simple linear model to your data:

y = β0 + β1x

where β0 is the intercept and β1 is the slope.

## Supporting Information

Origin's linear regression dialog box can be opened from an active worksheet or graph. From the menu:

1. Click Analysis: Fitting: Linear Fit (Open Dialog...).

## Recalculate

Recalculate Controls recalculation of analysis results None Auto Manual For more information, see: Recalculating Analysis Results

## Input

### Multi-Data Fit Mode

Multi-Data Fit Mode This control is available only when there is more than one input dataset. Independent-Consolidated Report The input datasets are fitted separately. The reports are consolidated into one sheet. Independent-Separate Report The input datasets are fitted separately. The reports are output to different worksheets. Concatenate All input datasets are concatenated and fitted as one curve.

### Input Data

Range Specify the input XY data range X X column of the curve. Y Y column of the curve. Error The Y error column. 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 text boxes to specify the range to be fitted. All Fit all rows of the dataset. 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. When fitting multiple XY datasets from a worksheet or a graph, you can use the Apply Row Range to All menu item to apply the same X row range to all input data. Specify a row range for the input column for Range 1, click the button to the right of Range 1, then click Apply Row Range to All. For more information, see: Specifying Your Input Data

## Fit Control

Errors as Weight

Use error bars as value for weights. Only available when a designated Error column is selected.

• No Weighting
Do not use any data as weighting.
• Direct Weighting
$w_i\,\!$ = values form the ith row of Error column and
$\chi ^2=\sum_{i=1}^n w_i (y_i-\hat y_i)^2$
• Instrumental
$w_i=\frac 1{\sigma _i^2}$
where $\sigma _i\,\!$ = values form the ith row of Error column and
$\chi ^2=\sum_{i=1}^n \frac 1{\sigma _i^2} (y_i-\hat y_i)^2$

Fix Intercept

Restrict the intercept to the value specified.

Fix Intercept at

Specify the intercept.

Fix Slope

Restrict the slope to the value specified.

Fix Slope at

Specify the slope.

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. By default, it is checked, and the covariance matrix is calculated by: $\sigma^2 (x^{\prime }x)^{-1}$, otherwise, $(x'x)^{-1}\,\!$.

When it is checked, it uses 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.

 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.
Apparent Fit

Use the apparent values for fitting, according to the current axis scales. For example, select this box to fit exponentially decaying data with a straight line fit when data are plotted on a log scale. When this check box is selected and the data has error values associated with it, Origin uses the larger of the positive/negative errors as 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.

 Apparent Fit is useful when you are performing a fit on data in an active graph window and you have changed the plot axis type (e.g. from Linear to Log10). When you select this option, the fitter will first transform your raw data into a new data space as specified by the graph axis type, and then fit the curve of the new data. Otherwise, Origin always fits raw data directly, regardless of the axis type. An apparent fit is equivalent to a direct fit performed on transformed raw worksheet data. All items in Residual Analysis are available for Apparent Fit. Outliers identification is also supported in Apparent Fit.

## Quantities

Fit Parameters Value Parameters' value. Standard Error Standard error of parameters . LCL The lower confidence limit. UCL The upper confidence limit. Confidence Level for Parameters (%) The confidence level for regression. t-Value t-test value of parameters. prob>|t| p-value of parameters. CI Half-Width Half-width of the confidence interval. For more information, see: Parameters Number of Points Total number of fitting points. Degrees of Freedom Model degrees of freedom. Reduced Chi-Sqr The Reduced Chi-square value (equal to the residual sum of square divided by the degrees of freedom). R Value The $R\,\!$ value (equal to to square root of $R^2\,\!$). Residual Sum of Squares Residual sum of squares (RSS); or sum of square error. Pearson's r Pearson correlation coefficient. R-Square (COD) Coefficient of determination. Adj. R-Square Adjusted coefficient of determination. Root-MSE (SD) Residual standard deviation; or square root of mean square error. Norm of Residuals Norm of residuals; equals to square root of RSS. For more information, see Statistics Output the fit summary table. This table organizes fit parameters by row for each curve (dependent data). Output the analysis of variance table. For more information, see: ANOVA Table Output the Lack of Fit results for fitting replicate data, which is used to measure the adequacy of the specified model. For more information, see: Lack of Fit Table Output the covariance matrix. For more information, see: Covariance and Correlation Matrix Output the correlation matrix. For more information, see: Covariance and Correlation Matrix Output outliers list. Intercept of the fitted curve with line Y = 0.

## Residual Analysis

Select methods to calculate and output residuals. For more information, see Graphical Residual Analysis

Regular Output the regular residuals. Output the standardized residuals. Output the studentized (internally studentized ) residuals. Output studentized deleted (externally studentized) residuals.

## Find X/Y

A Find Y from X table is used to obtain a dependent variable value that corresponds to a given independent variable value. A Find X from Y table is used to obtain an independent variable value for a given dependent variable value.