CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Inference for Numerical Data in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de 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
  ___
Modifier et exécuter le code