Andrew Heiss, “Statistical Methods in Public Policy Research,” chapter for The Oxford Research Encyclopedia on Public Policy (2026). Get the PDF here or here or read an HTML version here. (Heiss 2025)
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.
library(tidyverse)library(parameters) # For extracting model coefficientslibrary(performance) # For extracting model details like R²library(marginaleffects) # For working with models after they've been fitpenguins <- penguins |>drop_na(sex)# Flipper length only (a slider)model1 <-lm(body_mass ~ flipper_len, data = penguins)model_parameters(model1)
model2 |>avg_predictions(variables ="species") |>ggplot(aes(x = species, y = estimate, color = species)) +geom_pointrange(aes(ymin = conf.low, ymax = conf.high))
# Make Gentoo the reference case by moving its level/category to the frontmodel2_different_reference <-lm( body_mass ~ species,data = penguins |>mutate(species =fct_relevel(species, "Gentoo")))model_parameters(model2_different_reference)
Huntington-Klein, Nick. 2021. The Effect: An Introduction to Research Design and Causality. Boca Raton, Florida: Chapman and Hall / CRC. https://theeffectbook.net/.
Ismay, Chester, and Albert Y. Kim. 2019. Statistical Inference via Data Science: A ModernDive into R and the Tidyverse. 1st ed. Boca Raton, Florida: Chapman and Hall / CRC. https://doi.org/10.1201/9780367409913.