Why Allow Both a Jump and a Slope Change?
A relationship between a predictor \(x\) and a response \(y\) may behave differently before and after a known breakpoint \(c\). For example, a process could have one average level and rate of change before a policy takes effect, then experience an immediate level shift as well as a different rate of change afterward. A continuous piecewise linear model allows the rate of change to differ but requires the two line segments to meet at the breakpoint. When an immediate jump is also plausible, the model needs a separate term to represent it.
The key is to distinguish two changes. A level jump is a difference between the fitted value just to the right of the breakpoint and the fitted value just to its left. A slope change is a difference between the rate of change on the right and the rate of change on the left. The indicator term represents the first; the hinge term represents the second.
The Segmented Model With a Jump
A convenient parameterization centers the predictor at the breakpoint. For observation \(i\), use
Here \(Y_i\) is the response, \(x_i\) is the predictor, and \(c\) is a fixed breakpoint. The parameters \(\beta_0,\beta_1,\delta,\gamma\) are regression coefficients, and \(\varepsilon_i\) is the error. The model’s conditional mean is the part of the equation before the error term. Writing it separately on either side makes the roles of the two added terms clear.
At \(x_i=c\), the indicator is zero and the hinge is zero, so the fitted value is \(\beta_0\). As \(x\) approaches \(c\) from the left, the fitted value approaches \(\beta_0\). As \(x\) approaches \(c\) from the right, it approaches \(\beta_0+\delta\). Thus \(\delta\) is the jump from the left-hand limit to the right-hand limit. The convention here assigns an observation exactly at \(c\) to the left branch; the jump describes the difference in the one-sided limits, not a different value assigned to that exact observation.
The hinge is zero at the breakpoint and on its left, so it cannot create a level jump. Above \(c\), it equals \(x-c\), which adds \(\gamma\) times the distance above the breakpoint. Consequently, the slope is \(\beta_1\) on the left and \(\beta_1+\gamma\) on the right. The change in slope is \(\gamma\). These meanings are distinct even though both terms are activated on the right.
Deriving the Two-Branch Form
The model can be built directly from two line segments. Suppose the left line is \(\beta_0+\beta_1(x-c)\), while the right line has a jump \(\delta\) at \(c\) and a slope change \(\gamma\). Its value at the breakpoint from the right is \(\beta_0+\delta\), and its slope is \(\beta_1+\gamma\). Therefore its equation is \(\beta_0+\delta+(\beta_1+\gamma)(x-c)\). The single indicator-and-hinge formula reproduces both branches:
This is the hinge-basis construction with an additional indicator term. If \(\delta=0\), the two branches meet, giving a continuous piecewise linear fit. If \(\gamma=0\), the slopes match, but a jump can remain. If both are zero, the breakpoint adds no change to the fitted line.
Worked Example: Calculating Both Changes From a Small Hypothetical Data Set
Suppose a hypothetical process is recorded at four predictor values. The known breakpoint is \(c=50\), and the observations are as follows. These values are constructed to illustrate the model’s algebra; they are not a real study.
| \(x\) | Observed \(y\) |
|---|---|
| 30 | 128 |
| 40 | 124 |
| 60 | 106.5 |
| 70 | 105 |
The fitted model for these four points is \( \hat{y}=120-0.4(x-50)-12I(x>50)+0.25(x-50)_+ \). Substituting \(x=30\), the indicator and hinge are both zero, so \(\hat{y}=120-0.4(30-50)=120+8=128\). At \(x=40\), \(\hat{y}=120-0.4(-10)=124\).
At \(x=60\), the indicator is 1 and the hinge is \(60-50=10\), giving \(\hat{y}=120-0.4(10)-12+0.25(10)=120-4-12+2.5=106.5\). At \(x=70\), \(\hat{y}=120-8-12+5=105\). The four fitted values match the displayed observations.
The left-hand limit at 50 is 120, while the right-hand limit is \(120-12=108\); the jump is \(-12\) response units. The left slope is \(-0.4\) response units per predictor unit, and the right slope is \(-0.4+0.25=-0.15\). The hinge changes the slope, making the right-hand decline less steep; it does not account for the 12-unit level shift.
Reading the Indicator and Hinge Separately
A useful way to check a model is to compare its terms at a value below the breakpoint, exactly at the breakpoint, and above it. Below and at \(c\), both added terms are zero. Above \(c\), the indicator contributes the same amount \(\delta\) at every point, while the hinge contribution grows with distance from \(c\). This difference in behavior explains why the terms cannot be treated as interchangeable.
Worked Example: A Fixed Jump and a Changing Hinge Contribution
Consider a hypothetical fitted model for response in units, with predictor \(x\) measured in hours and breakpoint \(c=8\):
At \(x=7.9\), both added terms are zero, so \(\hat{y}=30+1.5(-0.1)=29.85\). At \(x=8\), they are still zero and \(\hat{y}=30\). Just above 8, the indicator adds 6 units immediately, while the hinge contribution is initially close to zero. For \(x=8.1\), \(\hat{y}=30+1.5(0.1)+6-0.5(0.1)=36.10\).
At \(x=10\), the indicator still contributes 6, but the hinge now contributes \(-0.5(2)=-1\). Thus \(\hat{y}=30+1.5(2)+6-1=38\). The right-hand limit at the breakpoint is 36, compared with a left-hand limit of 30, so the jump is 6 response units. The left slope is 1.5 units per hour and the right slope is \(1.5-0.5=1.0\) unit per hour.
If the indicator were omitted, this model would meet continuously at \(x=8\), because the hinge is zero there. If the hinge were omitted instead, the model would still jump by 6, but both sides would have slope 1.5. Comparing the fitted values close to the breakpoint isolates the level jump; comparing rates of change on the two branches isolates the slope change.
Constructing Coefficients From Two Desired Lines
The model can also be assembled from a pair of proposed line segments. Suppose the left segment is written in centered form as \(a_L+b_L(x-c)\), and the right segment as \(a_R+b_R(x-c)\). The left branch of the segmented model requires \(\beta_0=a_L\) and \(\beta_1=b_L\). Matching the right-hand limit and right slope then gives \(\delta=a_R-a_L\) and \(\gamma=b_R-b_L\). These differences follow by equating the corresponding coefficients on the right branch.
Worked Example: Translating Two Segment Equations Into Basis Terms
Suppose two hypothetical fitted lines are intended to meet a breakpoint \(c=3\). The left line is \(5+2(x-3)\), and the right line is \(9+0.5(x-3)\). The left value at the breakpoint is 5 and the right-hand limit is 9, so \(\delta=9-5=4\). The slope changes from 2 to 0.5, so \(\gamma=0.5-2=-1.5\). The combined model is
At \(x=1\), the indicator and hinge are zero, giving \(\hat{y}=5+2(-2)=1\), as given by the left line. At \(x=3\), the model gives 5. At \(x=4\), it gives \(5+2(1)+4-1.5(1)=9.5\), equal to the right line \(9+0.5(1)=9.5\). At \(x=7\), the model gives \(5+8+4-6=11\), equal to \(9+0.5(4)=11\).
This check verifies the role of each coefficient: the indicator creates the four-unit difference between the two one-sided values at \(x=3\), and the hinge changes the slope by \(-1.5\). The right slope is \(2-1.5=0.5\); the breakpoint itself has not moved.
Model Assumptions and Fitting
For a fixed \(c\), the coefficients can be estimated by least squares using the four predictors \(1\), \(x_i-c\), \(I(x_i>c)\), and \((x_i-c)_+\). The model assumes that the conditional mean follows the stated two-line form, with a single jump and a single slope change at that breakpoint. For the usual regression error description, assume errors have mean zero conditional on the predictor values and a common variance; independent errors are also needed for the usual standard-error calculations. Normal errors are an additional condition for exact small-sample \(t\)-based inference, not for defining the fitted segmented mean.
The breakpoint must be fixed for this construction. The data need observations on both sides, and the columns of the model matrix must be linearly independent to identify all four coefficients. For instance, without observations above \(c\), the indicator and hinge remain zero throughout the data, so their coefficients cannot be estimated from those observations. Choosing or searching for an unknown breakpoint is a separate problem.
The fitted coefficients describe the model’s mean relationship, not a causal effect by themselves. In particular, a fitted jump does not establish that a policy or event caused an outcome to change. That conclusion would require a study design and supporting assumptions beyond this model’s algebra.
Common Mistake: Treating the Hinge as the Jump
- Incorrect reasoning: “The hinge switches on after the breakpoint, so its coefficient is the jump.”
- Correction: The hinge equals zero at \(c\) and tends to zero as \(x\) approaches \(c\) from the right. Its coefficient changes the right-hand slope. The indicator contributes a constant \(\delta\) immediately to the right, so \(\delta\) is the one-sided level jump.
- Another pitfall: Calling \(\gamma\) the right-hand slope. The right-hand slope is \(\beta_1+\gamma\); \(\gamma\) is only the change from the left slope.
- Check the breakpoint convention: In this model \(I(x>c)\) is zero at \(x=c\). An observation exactly at the breakpoint is assigned the left-branch fitted value, even though the right-hand limit may differ.
Check Your Understanding
Use the model and definitions above to answer the following questions.
- For \(c=10\), what are the indicator and hinge values at \(x=10\), and which branch supplies the fitted value there?
- In \(\hat{y}=4+3(x-c)-2I(x>c)+0.5(x-c)_+\), state the jump, the left slope, and the right slope.
- Why can a hinge term alone change the slope without creating a discontinuity at the breakpoint?
- If two centered segment equations have left intercept 12 and right intercept 9 at the breakpoint, what is the indicator coefficient?
- What model-matrix condition is needed to identify all four coefficients, and why can it fail if no observations lie above the breakpoint?