Problem 9.3

Vincent Miceli

5/13/2020

(a) Write the equation of the regression model that includes all of the variables.

-80.41 + .44(gestation) - 3.33(parity) - .01(age) + 1.15(height) + .05(weight) - 8.40(smoke)

(b) Interpret the slopes of gestation and age in this context.

Gestation has a positive slope, and age has nearly 0 slope but slightly negative.

(c) The coefficient for parity is different than in the linear model shown in Exercise 9.2. Why might there be a difference?

Adding new variables often changes the regression line, resulting in new intercepts and coefficients.

(d) Calculate the residual for the first observation in the data set.

point_1 <- 120

pred_1 <- -80.41 + .44 * 284 - 3.33 * 0 - .01 * 27 + 1.15 * 62 + .05 * 100 - 8.40 * 0

e <- abs(point_1 - pred_1)

## [1] 0.58

(e) 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.

r2 <- 1 - (249.28 / 332.57)

adj_r2 <- 1 - ((1 - r2) * (1236 - 1) / (1236 - 6 - 1))

r2 adj_r2

## [1] 0.2504435
## [1] 0.2467842