Trying to understand the results from robust linear regression. I'm trying the following code:
xx = np.random.rand(100, 1 )*50 yy = np.random.rand(100, 1) rlm_res_fake = sm.RLM(xx, yy, M=sm.robust.norms.TrimmedMean()).fit() plt.scatter(xx,yy) plt.plot(xx, rlm_res_fake.params*xx) print ('pvalue') print (rlm_res_fake.pvalues) print ('params') print (rlm_res_fake.summary())
Why do I always get a significant p-value even for randomized data that is clearly not correlated ? Is that not what the p-value mean - that we reject the hypothesis of zero slope ?