Quantifying the relationship between smoking during pregnancy and birth weight
Let's construct a bootstrap interval for the difference in mean weights of babies born to smoker and non-smoker mothers. The ncbirths_complete_habit
data frame you created earlier is available to use.
This exercise is part of the course
Inference for Numerical Data in R
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Generate 1500 bootstrap difference in means
diff_mean_ci <- ncbirths_complete_habit %>%
# Specify weight vs. habit
___ %>%
# Generate 1500 bootstrap replicates
___ %>%
# Calculate the difference in means, nonsmoker then smoker
___