probit, statsmodels : AttributeError: module 'statsmodels' has no attribute 'discrete'
probit, statsmodels : AttributeError: module 'statsmodels' has no attribute 'discrete'
我已经检查了 this post 并卸载并重新安装,但我仍然遇到同样的问题。
import statsmodels
results = statsmodels.discrete.discrete_model.Probit(y, x)
print(results.summary())
然后我得到
result_3 = statsmodels.discrete.discrete_model.Probit (y, x)
AttributeError: module 'statsmodels' has no attribute 'discrete'
子模块不会自动导入。
例如,您需要导入 discrete_model 才能使用
statsmodels.discrete.discrete_model
或使用api
界面
请参阅 http://www.statsmodels.org/dev/api-structure.html 了解背景和动机。
我已经检查了 this post 并卸载并重新安装,但我仍然遇到同样的问题。
import statsmodels
results = statsmodels.discrete.discrete_model.Probit(y, x)
print(results.summary())
然后我得到
result_3 = statsmodels.discrete.discrete_model.Probit (y, x)
AttributeError: module 'statsmodels' has no attribute 'discrete'
子模块不会自动导入。
例如,您需要导入 discrete_model 才能使用
statsmodels.discrete.discrete_model
或使用api
界面
请参阅 http://www.statsmodels.org/dev/api-structure.html 了解背景和动机。