STATS QUIZ!
I have the datapoints below. Nothing hidden, no tricks, just a bunch of data making roughly an ellipse.
In your head, draw what you think the ordinary least squares line (i.e. good ol& #39; y= mx+b) line looks like for these data.
I have the datapoints below. Nothing hidden, no tricks, just a bunch of data making roughly an ellipse.
In your head, draw what you think the ordinary least squares line (i.e. good ol& #39; y= mx+b) line looks like for these data.
Seems "obvious" right?
Except that& #39;s not the OLS line.
The red dashed line is the OLS line.
What& #39;s going on here?
Except that& #39;s not the OLS line.
The red dashed line is the OLS line.
What& #39;s going on here?
Ordinary least squares is the line which minimizes the VERTICAL squared distances.
Take a vertical line on the data, and draw a midpoint between the top and bottom of the ellipse. Do that for all points.
OLS is the line that minimizes the sum of those (squared) distances.
Take a vertical line on the data, and draw a midpoint between the top and bottom of the ellipse. Do that for all points.
OLS is the line that minimizes the sum of those (squared) distances.
In your head, you were probably trying to find the line that minimizes the TOTAL distance, not just the distance on the vertical.
That& #39;s the ORTHOGONAL (or total) least squares line. Totally natural, and it isn& #39;t wrong. Makes you wonder why we care only about the vertical, eh?
That& #39;s the ORTHOGONAL (or total) least squares line. Totally natural, and it isn& #39;t wrong. Makes you wonder why we care only about the vertical, eh?
RABBIT HOLE TIME!
What we are implying here is that Y is the DOMINANT axis.
That& #39;s great and fine if we are trying to predict Y from X, or estimate how much X causes Y.
But you& #39;ve heard the phrase "it& #39;s just association" right?
What we are implying here is that Y is the DOMINANT axis.
That& #39;s great and fine if we are trying to predict Y from X, or estimate how much X causes Y.
But you& #39;ve heard the phrase "it& #39;s just association" right?
If all we care about is that X and Y move together, we shouldn& #39;t have a dominant axis at all! We& #39;d probably want to use something more like TLS.
In other words, the form of our estimates pushes us toward prediction/causation thinking, even if we really don& #39;t want to.
In other words, the form of our estimates pushes us toward prediction/causation thinking, even if we really don& #39;t want to.
Small clarification OLS is (was a bit unclear):
The OLS line is the line in which the sum of the squared vertical distances from the line and the datapoints are minimized.
The midpoint bit is an illustration for intuition, not strictly how OLS actually "works"
The OLS line is the line in which the sum of the squared vertical distances from the line and the datapoints are minimized.
The midpoint bit is an illustration for intuition, not strictly how OLS actually "works"
The above thread was inspired by one from @kareem_carr here: https://twitter.com/kareem_carr/status/1304552047790845952
For">https://twitter.com/kareem_ca... more thought provoking stuff on axis dominance and graphical displays, check out @CT_Bergstrom and @jevinwest& #39;s "Diamond Plot" idea.
https://arxiv.org/abs/1809.09328 ">https://arxiv.org/abs/1809....
For">https://twitter.com/kareem_ca... more thought provoking stuff on axis dominance and graphical displays, check out @CT_Bergstrom and @jevinwest& #39;s "Diamond Plot" idea.
https://arxiv.org/abs/1809.09328 ">https://arxiv.org/abs/1809....
I& #39;ve neglected finishing the code for it, but I& #39;ve been playing with an alternative take on the Diamond Plot: the Rotatogram.
Instead of fixed axes / moving regression line, the (orthogonal) regression line is fixed vertically or horizontally, and the axes rotate around it.
Instead of fixed axes / moving regression line, the (orthogonal) regression line is fixed vertically or horizontally, and the axes rotate around it.
Some followups from the responses:
@cdsamii pointed out that this is apparently the literal cover example of David Freedman& #39;s "Statistical Models" text. Maybe one day, I& #39;ll have a truly original idea. ¯\_(ツ)_/¯ https://twitter.com/cdsamii/status/1305128029811810304">https://twitter.com/cdsamii/s...
@cdsamii pointed out that this is apparently the literal cover example of David Freedman& #39;s "Statistical Models" text. Maybe one day, I& #39;ll have a truly original idea. ¯\_(ツ)_/¯ https://twitter.com/cdsamii/status/1305128029811810304">https://twitter.com/cdsamii/s...
As many have noted, principal components analysis (PCA) is also based on the idea of orthogonal least squared distances. In this simple example, PCA, orthogonal least squares, total least squares and Deming regression are functionally equivalent and get you that symmetrical line.