Linear Regression in statsmodels

Click here to watch a video on fitting linear regression models in ‘statsmodels’
Author

George I. Hagstrom

Published

February 11, 2026

I have recorded a video which covers the coding vignette at the end of Chapter 3 on fitting linear regression models using the ‘statsmodels’ package. I talk about the purpose of ‘statsmodels’ and contrast it with ‘sklearn’, and then go over the basic syntax, illustrating how to utilize the model summaries and plotting routines to interpret linear regression models. The book provides a python notebook which covers this content and which I largely followed, but I have my own notebook which includes my comments on the material, in case you find an alternative perspective helpful. Stay tuned for a soon to be uploaded bonus video on the material that was not covered at the end of Meetup 3 (I recorded it once but the recording did not capture any audio).

You can find the ’statsmodels video here

You can download my python notebook here: statsmodels vignette