Piecewise Linear Regression Models
eviews吧
全部回复
仅看楼主
level 13
2017年09月01日 14点09分 1
level 13
We discuss what are called "piecewise linear regression models" here, because they utilize interaction terms containing dummy variables.
Example
2017年09月01日 14点09分 2
level 13
Let's start with an example that demonstrates the need for using a piecewise approach to our linear regression model. Consider the following plot of the compressive strength (y) of n = 18 batches of concrete against the proportion of water (x) mixed in with the cement:
2017年09月01日 14点09分 3
level 13
The estimated regression line —the solid line —appears to fit the data fairly well in some overall sense, but it is clear that we could do better. The residuals versus fits plot:
2017年09月01日 14点09分 4
level 13
provides yet more evidence that our model needs work.
2017年09月01日 14点09分 5
level 13
We could instead split our original scatter plot into two pieces —where the water-cement ratio is 70% —and fit two separate, but connected lines, one for each piece. As you can see, the estimated two-piece function, connected at 70% —the dashed line —appears to do a much better job of describing the trend in the data.
2017年09月01日 14点09分 6
level 13
So, let's formulate a piecewise linear regression model for these data, in which there are two pieces connected at x = 70:
yi=β0+β1xi1+β2(xi1−70)xi2+ϵi
Alternatively, we could write our formulated piecewise model as:
yi=β0+β1xi1+β2x∗i2+ϵi
where:
yi is the comprehensive strength, in pounds per square inch, of concrete batch i
xi1 is the water-cement ratio, in %, of concrete batch i
xi2 is a dummy variable (0, if xi1 ≤ 70 and 1, if xi1 > 70) of concrete batch i
xi2* denotes the (xi1 - 70)xi2 the interaction term
2017年09月01日 14点09分 7
1