Reputation: 735
I have already check this post and uninstall and install again but I have still same problem.
import statsmodels
results = statsmodels.discrete.discrete_model.Probit(y, x)
print(results.summary())
and I get
result_3 = statsmodels.discrete.discrete_model.Probit (y, x)
AttributeError: module 'statsmodels' has no attribute 'discrete'
Upvotes: 1
Views: 1229
Reputation: 67
You could also import in this way
from statsmodel.api import Probit
model = Probit(y,x)
try this
Upvotes: 0
Reputation: 22897
Submodules are not automatically imported.
For example, you need to import discrete_model before you have it available
statsmodels.discrete.discrete_model
or use the api
interface
See http://www.statsmodels.org/dev/api-structure.html for background and motivation for this.
Upvotes: 2