Live data from Hacker News

Abusing linear regression to make a point

goodmath.org

11–20 of 50 posts

Re: Abusing linear regression to make a point

#12
post #6

> I said that if you had reason to believe in a linear relationship, then you could try to find it. That’s the huge catch to linear regression: no matter what data you put in, you’ll always get a “best match” line out. This challenge generalizes to all model fitting. Incorrectly assuming a distribution is Gaussian is a big one.

Another one is handwaving that a distribution is normal when n > 30 because "central limit theorem!"

Amateur statistics is full of magical numbers and thresholds where everything "just works" :)

Re: Abusing linear regression to make a point

#13

This article does not capture what is actually wrong with the regression. First, it's not necessarily wrong to fit a linear regression to data that might not be from a linear model, or that you know to be nonlinear. The data could be linear enough in the region of interest for the line to nonetheless be useful, for example. Sure, you need an underlying linear process if you want certain theorems and guarantees to app…

> First, it's not necessarily wrong to fit a linear regression to data that might not be from a linear model, or that you know to be nonlinear. The data could be linear enough in the region of interest for the line to nonetheless be useful, for example.

Yes, very good point! Likewise regression is not robust to log transformations, but we still use log transformations (depending on the data) because we may be able to tolerate some loss of information. If the nonlinear correlation is bounded below some tolerable amount it's okay to use the linear relationship on its own.

Re: Abusing linear regression to make a point

#14

This article does not capture what is actually wrong with the regression. First, it's not necessarily wrong to fit a linear regression to data that might not be from a linear model, or that you know to be nonlinear. The data could be linear enough in the region of interest for the line to nonetheless be useful, for example. Sure, you need an underlying linear process if you want certain theorems and guarantees to app…

Agreed. I was curious enough to run the model myself so I used a tool to extract the data. The slope estimate (b=17.24) is not significantly different from zero, p=.437.

The data are here: https://pastebin.com/HhWTKZRb

Re: Abusing linear regression to make a point

#15

You can't mention spurious linear regression without predicting the S&P500 with Leinweiber's price of butter in Bangladesh indicator. https://nerdsonwallstreet.typepad.com/my_weblog/files/datami...

In a similar vein:

https://www.tylervigen.com/spurious-correlations

I'm not convinced all of these are spurious.

Re: Abusing linear regression to make a point

#16

You can't mention spurious linear regression without predicting the S&P500 with Leinweiber's price of butter in Bangladesh indicator. https://nerdsonwallstreet.typepad.com/my_weblog/files/datami...

Overfitting is insidious. These graphics would convince a lot of people who'd otherwise catch the error in the article without needing it to be explained to them. At that point it's not enough to eyeball the line of best fit, you have to sanity check the explanatory power and do cross validation...

Re: Abusing linear regression to make a point

#17
Could someone link to original article? Didn’t see in post. Notice that they don’t cite what the authors’ computed R^2 was but conjectured it was low (and I agree that it is likely low). Thus, doesn’t appear to be a case of blind p-hacking off the bat.

Could just be really bad. However could be that:

- The conclusion of the paper was that no relationship exists.

- Later specifications include covariates. For example, including travel flows here could help to disentangle cultural mores regarding drinking and probability that ANY virus was transmitted to place.

- some sort of weighting was done. Although in that case I would expect to see a steeper slope to account for New York. Usual practice here would be to display the univariate relationship with circles that are sized to match weights.

- Graphs like this can play tricks on your eyes. There might be a lot of dots clustered along the fit line that are overlapping etc.

Re: Abusing linear regression to make a point

#18
post #17

Could someone link to original article? Didn’t see in post. Notice that they don’t cite what the authors’ computed R^2 was but conjectured it was low (and I agree that it is likely low). Thus, doesn’t appear to be a case of blind p-hacking off the bat. Could just be really bad. However could be that: - The conclusion of the paper was that no relationship exists. - Later specifications include covariates. For example,…

the beauty of this post is that it is truly evergreen: there is, and always will be, bad statistics to grimace at

Re: Abusing linear regression to make a point

#19
post #10
post #6

> I said that if you had reason to believe in a linear relationship, then you could try to find it. That’s the huge catch to linear regression: no matter what data you put in, you’ll always get a “best match” line out. This challenge generalizes to all model fitting. Incorrectly assuming a distribution is Gaussian is a big one.

The variable of interest may not have a Gaussian distribution, but its expected value and variance generally are. Sure, there's some pathological cases, but the Cauchy distribution doesn't show up that often.

Does the Cauchy distribution ever actually show up?

Re: Abusing linear regression to make a point

#20
Ultimately, the author rejected the use of regression by using an eyeball test.

Eyeball tests are not rigorous, and can be misleading. Further, the purpose of regression is not just to obtain the slope via least squares in the case of obvious relationships, but to provide a test of the null hypothesis (slope = 0) of weaker, but theoretically interesting relationships.

This type of amateur (and wrong) statistics article shouldn't be making it to the top of HN.

Post reply on HN