First of all, apologies if I am not using the correct terminology to describe the problem. I have a dataset of two variables, which looks like this:
There are clearly two groups of points. I want to separate them so that I can fit a linear regression to each of them.
I can draw a line and decide that everything above it belongs to one group and everything below to the other, but it is a method too crude and the results are not good enough.
Cluster analysis probably can do it, but it seems a bit overkill and I was wondering if there is a simpler way to do it.
A simple data.frame (in R) for testing:
xx <- data.frame(A=c(1,2,3,4,1,1.1,1.2,1.3), B=c(1.1,1.2,1.3,1.4,1,2,3,4)) plot(xx$A, xx$B)