I'm running the code below with statsmodel 0.8.0 which i believe is the latest.
import statsmodels.api as sm
est = sm.Logit(y_train, x_train)
result = est.fit()
print(result.summary())
This is giving me an error saying:
AttributeError: module 'scipy.stats' has no attribute 'chisqprob'.
I dont seem to be able to find anything on stackoverflow or elsewhere to resolve this. Any help much appreciated.
Try this:
result.summary2()
Link:
http://www.statsmodels.org/stable/generated/statsmodels.discrete.discrete_model.LogitResults.summary2.html?highlight=summary2#statsmodels.discrete.discrete_model.LogitResults.summary2
You have two options. Either use,
> result.summary2()
or you can import chisqprob.
> from scipy import stats
> stats.chisqprob = lambda chisq, df: stats.chi2.sf(chisq, df)
I had the same problem but this solved it. However, you first need to import stats from scipy.
stats.chisqprob = lambda chisq, df: stats.chi2.sf(chisq, df)
Hope it helps you.
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