Skip to main content

Intermediate Regression with statsmodels in Python

Learn to perform linear and logistic regression with multiple explanatory variables.

Start Course for Free
4 Hours14 Videos52 Exercises3,192 Learners4300 XP

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

Linear regression and logistic regression are the two most widely used statistical models and act like master keys, unlocking the secrets hidden in datasets. In this course, you’ll build on the skills you gained in "Introduction to Regression in Python with statsmodels", as you learn about linear and logistic regression with multiple explanatory variables. Through hands-on exercises, you’ll explore the relationships between variables in real-world datasets, Taiwan house prices and customer churn modeling, and more. By the end of this course, you’ll know how to include multiple explanatory variables in a model, discover how interactions between variables affect predictions, and understand how linear and logistic regression work.

  1. 1

    Parallel Slopes


    Extend your linear regression skills to parallel slopes regression, with one numeric and one categorical explanatory variable. This is the first step towards conquering multiple linear regression.

    Play Chapter Now
    Parallel slopes linear regression
    50 xp
    Fitting a parallel slopes linear regression
    100 xp
    Interpreting parallel slopes coefficients
    100 xp
    Visualizing each explanatory variable
    100 xp
    Visualizing parallel slopes
    100 xp
    Predicting parallel slopes
    50 xp
    Predicting with a parallel slopes model
    100 xp
    Visualizing parallel slopes model predictions
    100 xp
    Manually calculating predictions
    100 xp
    Assessing model performance
    50 xp
    Comparing coefficients of determination
    100 xp
    Comparing residual standard error
    100 xp


Ad conversionCustomer churnTaiwan real estateFish measurement dataeBay auctions


richieRichie CottonmaggiematsuiMaggie Matsuiamy-4121b590-cc52-442a-9779-03eb58089e08Amy Peterson
Maarten Van den Broeck Headshot

Maarten Van den Broeck

Content Developer at DataCamp

Maarten is an aquatic ecologist and teacher by training and a data scientist by profession. After his career as a Ph.D. researcher at KU Leuven, he wished that he had discovered DataCamp sooner. He loves to combine education and data science to develop DataCamp courses. In his spare time, he runs a symphonic orchestra.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA