Regression and inference
Content for Monday, August 29, 2022
Readings
- Chapters 3 and 4 in The Effect (Huntington-Klein 2021)
Recommended readings
Look through your notes on regression from your last stats class. Also, you can skim through these resources:
- 5.1–5.4 in ModernDive (Ismay and Kim 2019)
- 6.1–6.4 in ModernDive (Ismay and Kim 2019)
- 7.1–7.3 in OpenIntro Statistics (Diez, Barr, and Çetinkaya-Rundel 2017)
- 8.1 in OpenIntro Statistics (Diez, Barr, and Çetinkaya-Rundel 2017)
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.
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:
- RStudio.cloud project
- Project
.zip
file - Gapminder data
- Lab slides 1: Markdown and universal writing (PDF)
- Lab slides 2: Getting started with R and RStudio (PDF)
- Lab slides 3: Data basics (PDF)
- Lab slides 4: Visualize data with ggplot2 (PDF)
- Lab slides 5: Transform data with dplyr (PDF)
-
restaurant_inspections.csv
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.