Reputation: 21
In statsmodels python API I'm excluding the constant in an OLS regression, as explained here:
[https://stackoverflow.com/questions/36409889/using-ols-from-statsmodels-formula-api-how-to-remove-constant-term][1]
It's working fine. Hower I've got an error running
statsmodels.stats.diagnostic.het_white(results.resid,results.model.exog)
This is the error:
File "B:\PYTHON37\lib\site-packages\statsmodels\stats\diagnostic.py", line 999, in het_white
assert resols.df_model == np.linalg.matrix_rank(exog) - 1
Any suggestions on how to run the White test when removing the constant from regression?
Upvotes: 2
Views: 905