1.1 R and RStudio

This book is about using R (R Core Team 2022) to do regression, not a book about learning R itself. The text assumes you have some basic familiarity with R and RStudio (an integrated development environment for R, making using R much easier), although you do not need to be an expert by any means. See RStudio Education for Beginners for links to installing R and RStudio and for excellent learning resources.

After you install R and RStudio, install some packages that will be used in this text.

install.packages(
  c("tidyverse",
    "Rcpp", "gtsummary", "flextable", "gt",
    "car", "gmodels", "Hmisc", "MASS",
    "sjPlot", "sjmisc", "effects",
    "ResourceSelection", "logbin",
    "survival", "bshazard",
    "survey",
    "mice", "miceadds", "mitml", "howManyImputations")
)

References

R Core Team. 2022. “R: A Language and Environment for Statistical Computing.” www.R-project.org.