Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OLS when exog is 1d #1186

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

Comments

Projects
None yet
2 participants
@josef-pkt
Copy link
Member

commented Nov 16, 2013

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

This comment has been minimized.

Copy link
Member

commented Nov 16, 2013

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

This comment has been minimized.

Copy link
Member Author

commented Nov 16, 2013

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
You can’t perform that action at this time.