# How to distinguish these two linear regressions?

I have two linear regressions. The linear coefficients of both of them are very close to $1$. The first plot seems reasonable linear regression, while the second one is tricky since if the bottom left part or the top right part of the data (they are quite random) are fitted, we can not get a close-to-1 coefficient.

The question is how to distinguish the two regressions after I get their very similar regression coefficient values? Instead of by looking at the plots, a statistic is preferred to describe the difference of the two regressions. Any ideas?

In part, you've answered your own question. You distinguish the regressions by looking at plots like the ones you've posted. R (and other programs) offer a set of default plots for linear models that is quite good.

Creating data that looks somewhat like yours:

set.seed(12321)
x <- c(rnorm(100, -5, 1), rnorm(100, 5, 1))
y <- 2*x + rnorm(200)
m1 <- lm(y~x)


we can then run

plot(m1)


And at least two of the plots show clear violations of assumptions.

• Well, after looking at the graphs, you could then test two regressions, one for larger values of $x_{t-1}$ and one for smaller values, and see that $R^2$ changes hugely compared to the whole set of values. Another option would be to plot a loess line to the data and then see how much the lines diverged; again, eyes would be key, but you could probably test the difference in the lines somehow. – Peter Flom Nov 27 '13 at 14:24