Reputation: 185
I know what the error means -I double-checked and my Y variable data is definitely within [0,1] with:
Y.max() = 1
Y.min() = 0.7333333
dtype(Y) is float64
I am reading in data using pandas. This is the first time I am using statsmodels.api package. Any ideas of what else I should check for this error
Upvotes: 0
Views: 4807
Reputation: 2816
I had the same problem. In a logistic regression you need a dichotomy variable, see https://en.wikipedia.org/wiki/Logistic_regression, either 0 or 1.The minimum should be 0, otherwise you do not have categories you have a continuous variables and maybe you want to use a linear regression instead.
Upvotes: 1