This instructional video provides a comprehensive guide to performing multiple linear regression using both Microsoft Excel and the R programming language. Using a body fat dataset with multiple potential predictor variables (e.g., abdomen circumference, weight), the lecture demonstrates how to build and evaluate regression models. Key focus is placed on calculating and interpreting goodness-of-fit metrics, including the adjusted R-squared, Akaike's Information Criterion (AIC), and the Bayesian Information Criterion (BIC). The instructor walks through using Excel's LINEST function for multiple predictors and then replicates the analysis in R using the lm() function. The video highlights how to use built-in R functions like AIC() and summary() to assess model quality and concludes by introducing the important concept of multicollinearity, where correlations between predictor variables can lead to counter-intuitive model coefficients.
Performing and Evaluating Multiple Regression in Excel and R
0:32 The Dataset: The lecture uses a dataset of 252 men to find a simple way to predict percent body fat using easily obtainable measurements like abdomen circumference, weight, and height, as an alternative to complex methods like underwater weighing.
2:26 Single Variable Regression in Excel: The instructor begins by demonstrating a standard single-variable regression in Excel using the LINEST function to predict body fat from abdomen circumference.
3:00 Goodness-of-Fit Metrics: Key metrics for evaluating a model's performance are introduced: adjusted R-squared, Akaike's Information Criterion (AIC), and the Bayesian Information Criterion (BIC). The goal is to find models with a higher adjusted R-squared and lower AIC/BIC values.
5:36 Multiple Regression in Excel: The video explains how to perform multiple regression with LINEST by selecting multiple, adjacent columns as the input 'x' variables. The output array expands to provide coefficients for each predictor.
8:25 Comparing Models: By adding 'weight' as a second predictor to the 'abdomen' model, the AIC drops from 800 to 756, indicating that the two-variable model is a better fit for the data.
10:56 Introduction to Multicollinearity: A critical concept is introduced when a model with 'weight' as a predictor results in a negative coefficient, despite weight being positively correlated with body fat. This is caused by the correlation between the predictor variables themselves (multicollinearity), a common complication in multiple regression.
11:42 Performing Regression in R: The demonstration shifts to R, starting with importing the data from a CSV file. The lm() function is used to build linear models, and a cleaner, recommended syntax is shown: lm(BodyFat ~ Abdomen, data = bodyfat).
14:56 Calculating AIC & BIC in R: R simplifies the calculation of goodness-of-fit metrics. The built-in AIC() function can compute both AIC (with k=2) and BIC (with k=log(n)). The extractAIC() function is also mentioned, noting it uses a slightly different formula but is equally valid for comparing models.
18:24 Getting Adjusted R-squared in R: Unlike in Excel, the adjusted R-squared value is automatically calculated and included in the output of the summary(model) command, making it easily accessible.
19:02 Adding Variables to a Model in R: Adding more predictor variables to a regression model in R is straightforward. You simply add them to the formula using a + sign, for example: lm(BodyFat ~ Abdomen + Weight + Chest, data = bodyfat).