We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
AttributeErrorTraceback (most recent call last) <ipython-input-140-7e4e9a85c845> in <module>() 1 (bb.query('h > 0') 2 .assign(ln_h = lambda df: np.log(df.h)) ----> 3 .pipe((sm.poisson, 'data'), 'hr ~ ln_h + year + g + C(lg)') 4 .fit() 5 .summary() ~/miniconda3/envs/pandas/lib/python3.6/site-packages/statsmodels/discrete/discrete_model.py in summary(self, yname, xname, title, alpha, yname_list) 2548 ('Log-Likelihood:', None), 2549 ('LL-Null:', ["%#8.5g" % self.llnull]), -> 2550 ('LLR p-value:', ["%#6.4g" % self.llr_pvalue]) 2551 ] 2552 ~/miniconda3/envs/pandas/lib/python3.6/site-packages/statsmodels/tools/decorators.py in __get__(self, obj, type) 95 if _cachedval is None: 96 # Call the "fget" function ---> 97 _cachedval = self.fget(obj) 98 # Set the attribute in obj 99 # print("Setting %s in cache to %s" % (name, _cachedval)) ~/miniconda3/envs/pandas/lib/python3.6/site-packages/statsmodels/discrete/discrete_model.py in llr_pvalue(self) 2403 @cache_readonly 2404 def llr_pvalue(self): -> 2405 return stats.chisqprob(self.llr, self.df_model) 2406 2407 @cache_readonly AttributeError: module 'scipy.stats' has no attribute 'chisqprob' <<<-------------------------------------------------------------------------
Just do something other than poisson. Or remove statsmodels entirely, that's not the crucial point of the example.
The text was updated successfully, but these errors were encountered:
Yah AFAICT statsmodels has no intention of fixing this on their end. I've been patching scipy.stats at import-time to avoid this.
Sorry, something went wrong.
I submitted a pull request #19923 which changes the example piping to statsmodels from poisson to ols.
Successfully merging a pull request may close this issue.
Just do something other than poisson. Or remove statsmodels entirely, that's not the crucial point of the example.
The text was updated successfully, but these errors were encountered: