8.3 Baby Weights, Part III

We considered the variables smoke and parity, one at a time, in modeling birth weights of babies in Exercises 8.1 and 8.2. A more realistic approach to modeling infant weights is to consider all possibly related variables at once. Other variables of interest include length of pregnancy in days (gestation), mother’s age in years (age), mother’s height in inches (height), and mother’s pregnancy weight in pounds (weight). Below are three observations from this data set.

The summary table below shows the results of a regression model for predicting the average birth weight of babies based on all of the variables included in the data set.

  1. Write the equation of the regression line that includes all of the variables.

We are using multivariable regression to help us evaluate the relationship between a predictor variable and the outcome while controlling for the potential influence of other variables.

\(\widehat{\mathrm{Birth Weight}} = \beta_{0} + \beta_{1}*gestation + \beta_{2}*parity + \beta_{3}*age + \beta_{4}*height + \beta_{5}*weight + \beta_{6}*smoke\)

\(\widehat{\mathrm{Birth Weight}} = -80.40 + \beta_{1}*.44 + \beta_{2}*-3.33 + \beta_{3}*-.01 + \beta_{4}*1.15 + \beta_{5}*.05 + \beta_{6}*-8.4\)

  1. Interpret the slopes of gestation and age in this context.

Each day of gestation increases baby birth weight by .44 ounces.

Each additional year on the mother’s age decrerases baby birth weight by .01 ounces.

  1. The coefficient for parity is different than in the linear model shown in Exercise 8.2. Why might there be a difference?

Parity is a binary variable where it is 0 if the child is the first born, and 1 otherwise. On its own, the relationship demonstrates that children that are not first born are 1.93 lbs lighter than the first borns. The intercept is 120.07 ounces. However, our multivariable model has a intercept of -80 and includes other variables that shift the relationship so that parity is not our only variable.

  1. Calculate the residual for the first observation in the data set.

Model Prediction Value

predicted_1 <- -80.40 + (284*.44) + (0*-3.33) + (27*-.01) + (62*1.15) + (100*.05) + (0*-8.4)
predicted_1
## [1] 120.59
actual_1 <- 120
residual <- actual_1 - predicted_1
residual
## [1] -0.59
  1. The variance of the residuals is 249.28, and the variance of the birth weights of all babies in the data set is 332.57. Calculate the R2 and the adjusted R2. Note that there are 1,236 observations in the data set.

We use an adjusted \(R^2\) when there are many variables

r_var <- 249.28
out_var <- 332.57
n <- 1236
k <- 6

r2 <- 1 - (r_var/out_var) 
r2
## [1] 0.2504435
r2adj <- 1 - ((r_var/out_var) * ((n-1)/(n-k-1)))
r2adj
## [1] 0.2467842