Segmented Regression — Definition, Formula & Example
Segmented regression is a way of fitting data with two or more straight-line pieces that meet at points called breakpoints. You use it when a trend runs at one rate and then clearly switches to a different rate.
For one breakpoint , the continuous segmented regression model is , where is the hinge term. The coefficients are estimated by least squares. The breakpoint is either fixed in advance or estimated by searching for the value that minimizes the residual sum of squares. The slope is for and for .
Key Formula
Where:
- = Predicted value of the response variable
- = Value of the explanatory variable
- = Breakpoint, the x-value where the slope changes
- = Intercept of the left segment
- = Slope of the left segment, where x is less than c
- = Change in slope at the breakpoint, so the right segment has slope beta 1 plus beta 2
Worked Example
Problem: A town records daily water use (thousands of gallons) against the day's high temperature (°F). Software fits a segmented regression and estimates a breakpoint at °F. The fitted model is . Find the slope of each segment, then predict water use on a 60°F day and on an 80°F day.
Step 1: Below the breakpoint, the hinge term is 0, so the slope is . Above it, the hinge term adds to the slope.
Step 2: For , the value is negative, so the hinge term is 0. Only the left line applies.
Step 3: For , the hinge term is , so the extra slope kicks in for those 10 degrees.
Answer: Water use rises 0.5 thousand gallons per °F below 70°F and 2.0 thousand gallons per °F above it. The model predicts 50 thousand gallons at 60°F and 75 thousand gallons at 80°F. Both pieces give 55 at , so the line bends without jumping.
Why It Matters
Segmented regression finds thresholds. Examples include the temperature where cooling demand surges, the dose where a drug stops helping, and the year a policy changed a trend. It appears in college statistics and econometrics courses, and in environmental science and public health research, where the location of the breakpoint is often the main result.
Common Mistakes
Mistake: Splitting the data at the breakpoint and running two separate least-squares lines.
Correction: Two independent fits usually do not meet at , which creates a jump the data may not support. They also ignore the uncertainty in the breakpoint itself. Fit one model with the hinge term . This forces the segments to connect, and it lets you estimate all coefficients, including , together.
