OLS when exog is 1d #1186

Closed
josef-pkt opened this Issue Nov 16, 2013 · 2 comments

Projects

None yet

2 participants

@josef-pkt
Member

need to check:

running OLS with 1d exog and then printing summary() showed large number of coefficients (same number as length exog), many with nans, no exception is raised

I thought this was working, or we don't automatically reshape to column vector anymore?

@jseabold
Member

Can you post code to replicate when reporting? This works fine for me

y = np.random.random(100)
X = np.random.random(100)
sm.OLS(y,X).fit().summary()
@josef-pkt
Member

invalid my mistake (late at night)

I was playing with several examples for LM test for Logit, and broadcasted exog myself to shape nobs, nobs

res_olslm4 = sm.OLS((res.model.endog - fitted_prob) / std, ex1[:,-1] / std[:,None]).fit()
ex1[:,-1] is the extra condition,
It was just to cross check rsquared between OLS and WLS.

@josef-pkt josef-pkt closed this Nov 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment