Comparing Two Regression Lines
Comparing Two Regression Lines with an Interaction
For two groups, let G be 0 for the reference group and 1 for the comparison group. The model Y = β0 + β1X + β2G + β3XG represents two lines. The reference line has intercept β0 and slope β1; the comparison line has intercept β0 + β2 and slope β1 + β3.
The interaction coefficient β3 is the difference in slopes. Testing whether β3 is zero tests whether the two slopes are equal.
If the interaction is not retained, a model with an indicator but no interaction gives parallel lines: β2 then represents an intercept difference at every value of X.
Intercept comparisons are most interpretable when the chosen zero of X is meaningful or after centering X at a relevant reference value.
A visible separation between two fitted lines is not by itself a test result. The appropriate inference uses the coefficient and uncertainty for the relevant indicator or interaction, under the model's assumptions. Comparing two separate p-values for separate slopes is not the same as testing their difference.
Which model form represents two groups with different intercepts but the same slope for X?
A fitted interaction model reports a p-value of 0.03 for the XG coefficient. At a preselected 0.05 significance level, which conclusion is supported about slope equality?