Add Linear Regression Line

This operation is only available in the right-click menus of scatterplots and sum-difference plots. What it does depends on if there is a ✓ mark to its left in a right-click menu.

When there is no ✓ mark:

It adds a trend line to the point cloud. The trend line is computed by linear regression with the variable on the vertical axis as the dependent variable and the variable on the horizontal axis as the independent variable.

If the Shift key is held down when this operation is invoked from the right-click menu [1], the fitted trend line goes through the origin; otherwise, it most likely won't go through the origin (that is, the intercept on the vertical axis won't be zero.)

When there is a ✓ mark:

The plot on which this operation is invoked is already displaying a linear regression line. This operation will remove the linear regression line being displayed.

If this operation is invoked from a panel plot [2] of a trellis display, the end effect is equivalent to invoking Add Linear Regression Lines on the associated trellis display.

Notes

[1]

Shift-<Add Linear Regression Line> for short.

[2]

Unlimited panel plots do not exhibit this behaviour.