Exercise

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.

Instructions 1/2

undefined XP
    1
    2

Generate 1500 bootstrap difference in means for birth weight by smoking habit.

  • Specify birth weight versus smoking habit.
  • Generate 1500 bootstrap replicates.
  • Calculate the difference in means, with order nonsmoker then smoker.