Resolved: ValueError: endog must be in the unit interval.
Hi,
In the Practice Exam:3 related to logistic regression, the variable 'Sold' has only 0s and 1s. But still it is showing this error.
2 answers ( 1 marked as helpful)
Hey Tulasi,
Thank you for reaching out!
In the last cell, note that the code should instead read:
reg_log = sm.Logit(y,x)
That is, you should swap the places of the x
and the y
variable.
Kind regards,
365 Hristina
Thank you for identifying such a simple mistake and helping me with your answer.