Last answered:

26 Sept 2022

Posted on:

16 Sept 2022

0

Logit regression statsmodels

hi,
How many variable  I can use in stats models logit regression?
it shows error if I add more than certain numbers of variables

3 answers ( 0 marked as helpful)
Instructor
Posted on:

16 Sept 2022

0

Hey,

Thank you for reaching out!

Could you please share the error you are getting?

Kind regards,
365 Hristina

Posted on:

16 Sept 2022

0

Thanks for prompt response Hristina. I made a mistake when I was assigning the the variable. The input had same variables twice led to the error.

below is the error I got.

File ~/opt/anaconda3/lib/python3.9/site-packages/numpy/linalg/linalg.py:88, in _raise_linalgerror_singular(err, flag)
     87 def _raise_linalgerror_singular(err, flag):
---> 88     raise LinAlgError("Singular matrix")

LinAlgError: Singular matrix
Instructor
Posted on:

26 Sept 2022

0

Hey again,

I'm happy to hear you've found the problem!

Enjoy the rest of the course! :)

Kind regards,
365 Hristina

Submit an answer