Add an intercept to simple OLS

15 views
Skip to first unread message

Russell Jones

unread,
Feb 5, 2018, 4:02:21 PM2/5/18
to pystatsmodels
I am using statsmodels to do a simple OLS model. However, I need to set the Y intercept to 0. Can this be done?

X = sm.add_constant(X)
est = sm.OLS(y, X).fit()

Thanks in advance,

Russ
Reply all
Reply to author
Forward
0 new messages