# Choosing a Linear Regression Model

Learn how to choose the best linear regression model for a particular research question.

Start## Key Concepts

Review core concepts you need to learn to master this subject

Choosing a Linear Model

R-Squared

Nested Models

Adjusted R-Squared

F-test

Log Likelihood

AIC and BIC

Training and Test Sets

Choosing a Linear Model

Choosing a Linear Model

For multivariate datasets, there are many different linear models that could be used to predict the same outcome variable. Therefore, we need methods for comparing models and choosing the “best” one for the task at hand.

Choosing a Linear Regression Model

Lesson 1 of 1

- 1In this lesson, we’ll discuss some of the ways we can compare and choose linear regression models using a variety of different methods. For example, suppose that we work at a bike rental company a…
- 3Let’s again suppose that we want to use the StreetEasy data to predict rental prices in NYC. We have the following two models that we want to compare: # Fit model 1 model1 = sm.OLS.from_formula(‘r…
- 4While R-squared is useful for comparing models with different sets of predictors, we saw that it could lead to overfitting when choosing between nested models. To address this issue, we can inste…
- 6So far, we’ve used R-squared, adjusted R-squared, and an F-test to compare models. These criteria are most useful for finding a model that best fits an observed set of data. They are often used whe…
- 7Similarly to R-squared, log-likelihood only increases as we add more predictors to a model. In the same way that adjusted R-squared penalizes R-squared for more predictors, there are criteria that …
- 8Another way of choosing a model to make predictions for new data (also called out-of-sample prediction) is by using
*training*and*test*datasets. The idea is that we only use PART of our data to …

## What you'll create

Portfolio projects that showcase your new skills

## How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory