|
|
|
|
|
by hervature
1553 days ago
|
|
I think you are conflating two different things. The R^2 is incredibly poor for all the plots. That's essentially what you are complaining about. However, you can still have a very low R^2 but a statistically significant slope. While I agree that the article needs more support due to only doing univariate analysis and potentially missing huge confounders, your complaint is not valid. Here is code for basically random points that have a tight slope coefficient: import numpy as np import statsmodels.api as sm n = 1000 desired_R2 = 0.05 mu = 0 sigma_noise = 0.1 sigma = np.sqrt(sigma_noise*2*(desired_R2/(1-desired_R2))) X = np.random.normal(mu, sigma, n) noise = np.random.normal(0, sigma_noise, n) y = X + noise X = sm.add_constant(X) model = sm.OLS(y, X).fit() model.summary() |
|