Regression and inference
Readings
- Chapters 3 and 4 in The Effect1
Recommended readings
Look through your notes on regression from your last stats class. Also, you can skim through these resources:
- 6.1–6.4 in ModernDive2
- 7.1–7.4 in ModernDive3
- 7.1–7.3 in OpenIntro Statistics4
- 8.1 in OpenIntro Statistics5
We’ll review all this regression stuff in the videos, so don’t panic if this all looks terrifying! Also, take advantage of the videos that accompany the OpenIntro chapters. And also, the OpenIntro chapters are heavier on the math—don’t worry if you don’t understand everything.
Slides
The slides for today’s lesson are available online as an HTML file. Use the buttons below to open the slides either as an interactive website or as a static PDF (for printing or storing for later). You can also click in the slides below and navigate through them with your left and right arrow keys.
View all slides in new window Download PDF of all slides
Videos
Videos for each section of the lecture are available at this YouTube playlist.
You can also watch the playlist (and skip around to different sections) here:
In-class stuff
Here are all the materials we’ll use in class:
- Session 2 FAQ slides (PDF)
- Errors vs. warnings vs. messages (i.e. what to do when R shows you red text)
- R Markdown examples:
- Example R Markdown file used as a code-through or step-by-step teaching document:
- Lots of blog posts here
- Julia Silge, “Modeling human/computer interactions on Star Trek from #TidyTuesday with workflowsets”
- Bob Rudis, “Some Covid Donuts To End The Week”
- Holger K. von Jouanne-Diedrich, “The “Youth Bulge” of Afghanistan: The Hidden Force behind Political Instability”
- Example R Markdown file used as a publicly-consumable document:
- Click on the “Manuscript” menu item at this site
- See the Rmd file here
- Example R Markdown file used as a code-through or step-by-step teaching document:
Hands-on R materials:
-
restaurant_inspections.csv
- RStudio.cloud project
- Project
.zip
file - Lab slides 3: Data basics (PDF)
- Lab slides 4: Visualize data with ggplot2 (PDF)
- Lab slides 5: Transform data with dplyr (PDF)
Bayesian statistics resources
In class I briefly mentioned the difference between frequentist and Bayesian statistics. You can see a bunch of additional resources and examples of these two approaches to statistics here. This huge blog post also shows how to do multilevel models with Bayesian models.
-
Nick Huntington-Klein, The Effect: An Introduction to Research Design and Causality (Boca Raton, Florida: Chapman and Hall / CRC, 2021), https://theeffectbook.net/. ↩︎
-
Chester Ismay and Albert Y. Kim, Statistical Inference via Data Science: A ModernDive into R and the Tidyverse (Chapman and Hall / CRC, 2019), https://moderndive.com/. ↩︎
-
Ibid. ↩︎
-
David M. Diez, Christopher D. Barr, and Mine Çetinkaya-Rundel, OpenIntro Statistics, 3rd ed., 2017, https://www.openintro.org/stat/textbook.php?stat_book=os. ↩︎
-
Ibid. ↩︎