Is it possible in python/scipy/numpy to zero the intercept of a multivariate regression? I couldn't find it in the OLS recipe (http://www.scipy.org/Cookbook/OLS).
I'd prefer not to have to use RPython but is that the only way?
http://statsmodels.sourceforge.net/stable/generated/statsmodels.regression.linear_model.OLS.html
statsmodels requires you to create your designmatrix, called exog, that does not automatically add a constant/intercept. So, using statsmodels you can just leave out the constant and run your regression.
Some test or result statistic might not be correct in this case, since they assume that a constant is included, for example r_squared, if I remember correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With