Regression Models for Epidemiology
Preface
This web-book is derived from my lecture slides for Epidemiology 204: “Quantitative Epidemiology III: Statistical Models”, at UC Davis.
I have drawn these materials from many sources, including but not limited to:
David Rocke’s materials from the 2021 edition of this course
Hua Zhou’s materials from the 2020 edition of Biostat 200C at UCLA
Vittinghoff et al. (2012)
Dobson and Barnett (2018)
Harrell (2015)
Using these lecture notes
These lecture notes are available online at https://d-morrison.github.io/rme/. The online notes are searchable and are currently being iteratively updated1. A pdf version of the notes is also downloadable from https://d-morrison.github.io/rme/Regression-Models-for-Epidemiology.pdf, and the source files are available at https://github.com/d-morrison/rme.
Compiling chapters as lecture slide decks
Each chapter’s source file can also be compiled as a lecture slide deck, using the _quarto-revealjs.yml
Quarto profile included in the git repository on Github.
For example, to compile Chapter 3 Models for Binary Outcomes as a slide deck:
clone the project repository from Github
Install the project dependencies using
devtools
:
library(devtools) # install from CRAN if needed
::install_deps() devtools
- Render the chapter using the
revealjs
profile using the following terminal shell command:
quarto render logistic-regression.qmd --profile=revealjs
You can also render all the chapters listed in the _quarto-revealjs.yml
Quarto profile as slide decks simultaneously:
quarto render --profile=revealjs
Extracting LaTeX commands from the online version of the notes
If you want to extract the LaTeX commands for any math expressions in the online lecture notes, you should be able to right-click and get this pop-up menu:
If you select “TeX commands”, you will get a window with MathJax code, which is more or less a dialect of LaTeX:
You can also grab the TeX commands from the quarto source files on github, but those files use custom macros (defined in https://github.com/d-morrison/rme/blob/main/macros.qmd), so it’s a little harder to reuse code from the source files.
Dark Mode
The online notes have two color palette themes: light and dark. You can toggle between them using the oval button near the top-left corner:
Other resources
These notes represent my still-developing perspective on regression models in epidemiology. Many other statisticians and epidemiologists have published their own perspectives, and I encourage you to explore your many options and find ones that resonate with you. I have attempted to cite my sources throughout these notes.
Here are some additional resources:
Dunn, Smyth, et al. (2018) is a recent textbook on GLMs. It doesn’t cover time-to-event models, and it doesn’t use the modern
tidyverse
packages (ggplot2
,dplyr
, etc.), but otherwise it seems great.Moore (2016) is a recent textbook on survival analysis. It also doesn’t use the
tidyverse
, but otherwise seems great.Harrell (2015) is another popular textbook. It uses
ggplot2
but notdplyr
, and covers GLMs and survival analysis. An abbreviated but continuously updated version with audio clips is available at https://hbiostat.org/rmsc/.Fox (2015) is another standard text.
McCullagh and Nelder (1989) is a classic, theoretical textbook on GLMs
Dalgaard (2008) covers GLMs and survival analysis at an applied level, using base R
Vittinghoff et al. (2012) covers GLMs, survival analysis, and causal inference, using Stata
Faraway (2016) has GLMs but not survival analysis
Selvin (2001) provides worked-out examples of applications for a wide range of statistical analysis techniques.
https://ucla-biostat-200c-2020spring.github.io/schedule/schedule.html provides course notes for “Biostat 200C - Methods in Biostatistics C” at UCLA, which is at the Biostatistics MS level.
https://online.stat.psu.edu/stat504/book/ provides course notes for “STAT 504 - Analysis of Discrete Data” at Penn State University. It includes logistic regression and Poisson regression, as well as 2-way tables and other related topics, and includes SAS code.
Nahhas (n.d.) is currently in-development
License
This book is licensed to you under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
The code samples in this book are licensed under Creative Commons CC0 1.0 Universal (CC0 1.0), i.e. public domain.
see the source file repository for recent changes: https://github.com/d-morrison/rme↩︎