# Introduction to Regression Methods for Public Health Using R

*2022-05-23*

# Welcome

### Thanks for visiting!

This is a **FIRST DRAFT** and is **not yet peer reviewed**. The goal is publication as a printed version (through CRC Press) with the online version remaining freely available. I am hopeful the review process will be complete by the end of 2022.

If you have any comments or suggestions, feel free to contact me at ramzi.nahhas@wright.edu. Thank you!

### Use

Introduction to Regression Methods for Public Health using R by Ramzi W. Nahhas is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

### Preface

This text is suitable as a second biostatistics course for Master of Public Health students or public health professionals. Almost all public health students take an introductory biostatistics course, providing foundational competencies but perhaps not enough to use more advanced methods without additional training. There are a plethora of textbooks covering topics such as linear regression, logistic regression, and survival analysis. Many texts, however, are aimed at those with a background in mathematical statistics and/or without a focus specifically on public health and/or without a focus on using R. The goal of this text is to bridge that gap – to provide a gentle introduction to regression methods, using R, that covers all the basics and a bit more with examples drawn from public health data. There are excellent texts that cover each of the methods covered herein, as well as R programming, in much greater detail than is provided here (e.g., Faraway 2016; Fox 2015; Fox and Weisberg 2019; Harrell 2015; Klein and Moeschberger 2010; Kleinman and Horton 2014; van Buuren 2018; Weisberg 2013; Wickham and Grolemund 2017; Wickham 2019). My hope is that for any who feel such texts are currently beyond your reach, what you learn here will give you the knowledge and skills to understand and carry out appropriate basic regression analyses and the foundation and confidence to go deeper.

### Software information and conventions

The **knitr** package (Xie 2015) and the **bookdown** package (Xie 2021) were used to compile this text. The R session information is shown below:

`::session_info() xfun`

```
## R version 4.0.5 (2021-03-31)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 19042)
##
## Locale:
## LC_COLLATE=English_United States.1252
## LC_CTYPE=English_United States.1252
## LC_MONETARY=English_United States.1252
## LC_NUMERIC=C
## LC_TIME=English_United States.1252
##
## Package version:
## base64enc_0.1.3 bookdown_0.22
## bslib_0.2.4 compiler_4.0.5
## digest_0.6.27 evaluate_0.14
## fs_1.5.0 glue_1.4.2
## graphics_4.0.5 grDevices_4.0.5
## highr_0.9 htmltools_0.5.1.1
## jquerylib_0.1.4 jsonlite_1.7.2
## knitr_1.33 magrittr_2.0.1
## markdown_1.1 methods_4.0.5
## mime_0.10 R6_2.5.0
## rappdirs_0.3.3 rlang_0.4.11
## rmarkdown_2.7 rstudioapi_0.13
## sass_0.3.1 stats_4.0.5
## stringi_1.5.3 stringr_1.4.0
## tinytex_0.31 tools_4.0.5
## utils_4.0.5 xfun_0.22
## yaml_2.2.1
```

Package names and inline code are formatted in a typewriter font (e.g., `knitr`

, `lm(Y ~ X)`

), and function names are followed by parentheses (e.g., `lm()`

).

### Acknowledgments

Names

### References

*Extending the Linear Model with R: Generalized Linear, Mixed Effects and Nonparametric Regression Models*. 2nd edition. Boca Raton, London, New York: Chapman; Hall/CRC.

*Applied Regression Analysis and Generalized Linear Models*. Third edition. Los Angeles: SAGE Publications, Inc.

*An R Companion to Applied Regression*. Third edition. Los Angeles: SAGE Publications, Inc.

*Regression Modeling Strategies*. Second edition. Switzerland: Springer International Publishing.

*Survival Analysis: Techniques for Censored and Truncated Data*. New York, NY: Springer.

*SAS and R*. 2nd edition. Boca Raton: Routledge.

*Flexible Imputation of Missing Data, Second Edition*. 2nd edition. Boca Raton: Chapman; Hall/CRC.

*Applied Linear Regression*. 4th edition. Hoboken, NJ: Wiley.

*Advanced R*. 2nd edition. Boca Raton London New York: Chapman; Hall/CRC.

*R for Data Science: Import, Tidy, Transform, Visualize, and Model Data*. 1st edition. Sebastopol, CA: O’Reilly Media.

*Dynamic Documents with R and Knitr*. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC. http://yihui.org/knitr/.

*Bookdown: Authoring Books and Technical Documents with r Markdown*. https://CRAN.R-project.org/package=bookdown.