# 3.7.5.38 LR

LabTalk Object Type:

Utility

Results generated from the (linear regression) lr command are placed in the following lr object properties.

For further control when performing linear regression, see the stat object.

Note on use the lr -b dataset or lr -e dataset commands to perform a linear regression

When you use the lr -b dataset or lr -e dataset commands to perform a linear regression on the beginning (b) or ending (e) linear region of dataset, the dataset is automatically searched for linearity, as determined by the following parameters that can be modified in the ORGSYS.CNF file:

lr.maxLRange: The percentage of the entire data range to perform a linear regression on. For example, when lr.maxLRange = 40 (default) and dataset has 20 points, lr -b dataset performs a linear regression on the first 8 points in dataset, if these points meet the requirements of the lr.chkLinearR parameter. Thus, if the fourth point is outside the tolerance set by lr.chkLinearR, then the lr -b dataset command would only perform a linear regression on the first three points in dataset.
lr.chkLinearR: Sets the amount of tolerance in the automatic determination of linear segments.

## Properties:

Property Access Description
numeric

Intercept.

numeric

Slope.

numeric

Number of points used in the fitting.

numeric

Correlation coefficient.

numeric

Standard deviation of the fit.

numeric

Standard deviation of the intercept

Lr Data1_B;
type "Slope is $(lr.b)"; type "Intercept is$(lr.a)";