Segmented (Piecewise) Regression
Segmented (piecewise) regression fits connected straight lines with different slopes on either side of a breakpoint, estimating the breakpoint location together with the slopes.
구간(꺾인선) 회귀는 꺾이는 점의 위치와 그 앞뒤 기울기를 함께 추정해 기울기가 바뀌는 연결된 직선을 적합하는 방법입니다.
I think the effect of my predictor changes after a certain threshold; how do I find that threshold and compare slopes before and after?
어떤 값을 넘으면 효과가 달라지는 것 같은데, 그 임계값과 전후 기울기를 어떻게 추정하나요?
Segmented regression models the outcome as a broken line whose slope changes at a breakpoint, and it estimates the breakpoint by minimizing the residual sum of squares. It reports the slopes on each side, the change in slope and an approximate standard error for the breakpoint.
When to use Segmented (Piecewise) Regression
- Theory or graphs suggest a threshold where the slope changes
- You want to report the location of the threshold with uncertainty
- The relationship is roughly linear on each side of the threshold
When to use something else
- The change is gradual and smooth; use natural cubic spline regression instead
- The breakpoint is a known date in a time series with autocorrelated errors; use interrupted time series (ITS) instead
Assumptions and requirements
- The mean is linear on each side of a single breakpoint in the first predictor and continuous at it
- Errors are independent with constant variance
- Enough observations lie on each side of the breakpoint
- Tests against a single line are approximate when the breakpoint is estimated
What the analysis reports
- Breakpoint estimate with approximate standard error and confidence interval
- Slopes before and after the breakpoint
- Slope change with test
- F comparison with a single straight line
- R² for segmented and linear models
How to report it
Segmented regression identified a breakpoint in [predictor] at [value], 95% CI [[value], [value]]; the slope was [value] below and [value] above the breakpoint (difference = [value], p = [value]).
Related methods
Run Segmented (Piecewise) Regression on Quorant
- Data you need
- a table (CSV or Excel) with an outcome variable and predictor (feature) columns
- Price
- 600 credits for one analysis up to 10,000 rows (complexity level 4); larger or wider data costs more. Optional methodologist review: 2400 credits.
- Checking
- Checked by property tests in every deployment
- Before you pay
- A free pre-analysis diagnosis checks your data and gives an exact quote; nothing is deducted until you approve it.