What test should be used to tell if two linear regression lines are significantly different? I have two lines in a x-y plot:


*

*observed migration distance (y) and predicted migration distance (x)
   $$Y=0.95X+0.31,$$ where 0.95 and 0.31 are the slope coefficient and the intercept (p-value = 0.001)

*1:1 line (slope: 1 and intercept: 0)
The null hypothesis is
$$y=ax+b$$
$$a_1=1=a_2\quad and\quad b_1=b_2$$
Please kindly advise what test to use to test the above hypothesis.
 A: In this particular case, one of your lines has a known slope and intercept (intercept 0, slope 1), so you don't fit some larger interaction model, you can just jointly test whether the other model is consistent with the population intercept and slope being 0 and 1 respectively.
This is a standard thing for a linear model.
It's slightly easier to regress y-x on x and in the second regression test for both intercept and slope being 0.
The RSS for the reduced model is the sum of (y-x)^2. The RSS for the full model can be extracted from the anova of the linear regression and you can perform an F test, but if you're working in R you can do this kind of thing:
 nullm <- lm((y-x)~0)
 fullm <- lm((y-x)~x)
 anova(nullm,fullm)

The model "nullm" is the LS model $y = 0 + 1 x + \varepsilon$ 
The model "fullm" is just the LS model with two parameters, but it has to have the same LHS as "nullm" to go into anova, so it looks unconventional. The function anova then calculates the F-test for the improvement of the full model over the null, which adds two parameters and reduces the residual sum of squares by the SS explained by the full model. This acts as a test of the null ($\text{H}_0: \alpha=\beta=0$) against the alternative that at least one of the two is not 0.
However, in this case, you can already see that the hypothesis is going to be rejected because the intercept is already very different from 0 (p=0.001), so there's probably no need to go through and do the whole thing, the result will be rejection at typical significance levels.
A: Just estimate both lines in a single model using an interaction effect and test whether the interaction effect and the main effect equals 0.
