3 Exercise 1: Multiple linear regression

Hydrostatic weighing, also known as underwater weighing or hydrodensitometry, is one of the most accurate ways to measure body fat.

The body fat of 78 high school wrestlers was measured using three separate techniques, namely hydrostatic weighing, skin fold measurements and the Tanita body fat scale. The results are stored in the data set HSwrestler in the PASWR package.

Read in the data using:

library(PASWR)
HSWRESTLER <- HSwrestler

The data set contains nine columns, described as follows:

  • AGE: age of wrestler in years
  • HT: height of wrestler in inches
  • WT: weight of wrestler in pounds
  • ABS: abdominal fat
  • TRICEPS: tricep fat
  • SUBSCAP: subscapular fat
  • HWFAT: hydrostatic fat
  • TANFAT: Tanita fat
  • SKFAT: skin fat

This can be seen by typing:

names(HSWRESTLER)

In this example, it is of interest to investigate how hydrostatic fat (HWFAT) is related to abdominal fat (ABS) and tricep fat (TRICEPS).

3.1 Exploratory analysis

TASK 1

  1. Produce scatterplots of HWFAT (y) against Lactic ABS (x), and HWFAT (y) against TRICEPS (x).

You can use plot() such as in the previous example with Grades. Or you can refer to previous weeks labs and use ggplot().

  1. Describe the relationship between HWFAT (y), ABS (x) and TRICEPS.

3.2 Fitting a linear model

In Example 1, the function lm() was used to find estimates for parameters of a simple linear regression model. The same function can be used for multiple linear regression models by specifying the explanatory variables on the right side of the tilde (~) operator inside the lm() function.

To build a multiple linear regression model with hwfat as the response variable and abs and triceps as explanatory variables, type:

lm(HWFAT ~ ABS + TRICEPS, data = HSWRESTLER)

Note down the equation of the fitted line from that is given:

HWFAT = + ABS + TRICEPS


QUESTION: Interpret what each coefficient means.

  • For every unit increase in abdominal fat, hydrostatic fat is expected to by unit, .

  • For every unit increase in tricep fat, hydrostatic fat is expected to by unit, .