0

I am trying to do a simple linear regression of a scatterplot and it results in this:

enter image description here

So, the red line is the result I get, but I expect something more like the black line (drew it roughly). I use ordinary least square minimization and I understand that the black line would have huge residuals for the points on the far right of the plot for example. So it is clear why I do not get the result I want.

Now, I am wondering if there are other methods, for example using the perpendicular distance to the line rather than the vertical. Maybe you can throw me some buzz words or give me some ideas on what I could try.

  • 1
    For buzzwords try "Deming regression". https://en.wikipedia.org/wiki/Deming_regression – George Savva Mar 14 '23 at 16:13
  • Why assume linearity, when you could instead use a nonparametric regression? – Alexis Mar 14 '23 at 16:16
  • @Alexis I think that is a separate issue and that why the strictly linear fit looks so wrong is a legitimate question (one that seems to be answered quite well in the linked question). – Dave Mar 14 '23 at 16:24
  • @Dave I think it is a reasonable comment in response to the title of Jailbone's question, and perhaps less of a separate issue. – Alexis Mar 14 '23 at 16:28

0 Answers0