What does the add_constant method does?
Please explain how x = sm.add_constant(x1) work?
And why does during fitting, the variables x and y is only considered and not x?
The variable x has only constant values right?
Thank you for reaching out!
Please, refer to the following thread for an answer to your question: