Last answered:

10 Apr 2023

Posted on:

08 Apr 2023


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? 

1 answers ( 0 marked as helpful)
Posted on:

10 Apr 2023


Hey Deepak,

Thank you for reaching out!

Please, refer to the following thread for an answer to your question:

Kind regards,

365 Hristina

Submit an answer