Errata

The following updates to the text have been made in the online version only:

May 2025

  • Created this Errata section
  • Replaced exclude = F with useNA = “ifany” in a few places in Section 6.22 (“Ordinal logistic regression)
  • In a pre-published version, datasets had variable labels created using Hmisc::label(). These caused errors in some places, so were removed, however a reference to these labels for the COVID dataset remained in the Appendix. This reference has been removed.
  • Updated Section 5.19 (“Box-Cox outcome transformation”) to use (Yλ1)/λ instead of Yλ.

February 2025

  • Chapter 4, Exercise 7: Changed the first “hypothesis” to plural
  • Chapter 4, Exercise 17
    • What is the predicted mean heart rate (and 95% CI) for those with a BMI of 20 kg/m2? For those with a BMI of 35 kg/m2?
    • Changed “predicted” to “estimated”
  • Section 5.9.4
    • Equation 5.2, the coefficient for the gender main effect is positive, not negative
    • “females have an average fasting glucose that is 1.746 mmol/L lower (since the coefficient is negative) than males.”
      • Lower changed to greater
      • negative changed to positive
  • The Section “Visualizing the Unadjusted” moved up a level so it is easier to find
  • Section 5.19 (Box-Cox), Example 5.1
    • Deleted the following: “Additionally, the errors were not normally distributed, although this by itself is not an issue due to the large sample size.”
    • Modified the beginning of “Re-check normality”
  • Multiple Linear Regression exercises 30 and 33: replaced “estimated” with “estimated mean” and “for a country” with “among countries”