LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Inference for Numerical Data in R

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# 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
  ___
Code bearbeiten und ausführen