What we’re modeling
Multiple linear regression explains a numeric outcome (response) using two or more predictors.
We’ll use the built-in mtcars dataset and model:
- Response: miles per gallon (mpg)
- Predictors: car weight (wt) and horsepower (hp)
Why this is useful:
- Predict outcomes
- Measure how each predictor relates to the response (holding others fixed)
- Do inference: confidence intervals, p-values, etc.