Regression Plane

Learn about the regression plane in multiple regression.

We'll cover the following...

Let’s now fit a regression model and get the regression table corresponding to the regression plane. To keep things brief in this lesson, we won’t consider an interaction model for the two numerical explanatory variables income and credit_limit. This isn’t like the interaction model we considered in the Interaction Model lesson, using the model formula score ~ age * gender. We’ll only consider a model fit with a formula of the form y ~ x1 + x2. Confusingly, however, because we now have a regression plane instead of multiple lines, the label “parallel slopes” doesn’t apply when we have two numerical explanatory variables. Just as we’ve done multiple times, the regression table for this model using our two-step process is in the code output below.

Press + to interact
# Fit regression model:
debt_model <- lm(debt ~ credit_limit + income, data = credit_ch6)
# Get regression table:
get_regression_table(debt_model)
  1. We first fit the linear regression model using the lm(y ~ x1 + x2, data) function and save it in debt_model.

  2. We get the regression table by applying the get_regression_table() function from the moderndive package to debt_model. ...