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
Closed

OLS when exog is 1d #1186

josef-pkt opened this issue Nov 16, 2013 · 2 comments
Labels
type-invalid invalid bug reports, not a bug or issue

Comments

@josef-pkt
Copy link
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
Copy link
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
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-invalid invalid bug reports, not a bug or issue
Projects
None yet
Development

No branches or pull requests

2 participants