This repository contains the replication materials for our study on prosecutor recall elections and public opinion, published in Public Opinion Quarterly. The research examines voter attitudes toward prosecutor performance and policy positions in the context of recall elections.
- Voters distinguish between extensive margin (who enters the system) and intensive margin (severity of treatment) policy positions
- "Progressive" voters who supported the recall show distinct policy preferences
- Treatment framing significantly affects political support for prosecutor candidates
| Component | Technologies |
|---|---|
| Statistical Analysis | R (estimatr, modelsummary) |
| Machine Learning | randomForest for voter classification |
| Visualization | ggplot2, custom theme development |
| Survey Methods | Experimental design, survey weighting |
prosecutor-recall-study/
├── analysis/
│ ├── da_ana.Rmd # Main analysis (R Markdown)
│ └── data/
│ └── sample/ # Sample data for replication
├── poq/
│ ├── poq_margins.Rmd # Publication figures
│ ├── poq_margins_descriptives.Rmd
│ └── readme.txt
├── figures/
├── LICENSE
└── README.md
The study uses a randomized survey experiment with three treatment conditions:
| Condition | Description |
|---|---|
| Get Tough | Prosecutor emphasizes punitive policies |
| Reduce Extent | Prosecutor emphasizes diversion/declination |
| Reduce Intensity | Prosecutor emphasizes reduced sentences |
# Linear regression with clustered standard errors
recall_models <- list(
"Recall Proponents" = lm_robust(out1 ~ group1, data = da_recall,
clusters = response_id),
"Recall Opponents" = lm_robust(out1 ~ group1, data = da_no,
clusters = response_id)
)# Predict recall vote using policy preferences
rf <- randomForest(
out_vote ~ out2 + sal + puni_t + prog + sym + rr,
ntree = 2000,
mtry = 1,
data = match_da
)# Install required packages
install.packages(c(
"here", "tidyverse", "estimatr", "modelsummary",
"randomForest", "ggplot2", "haven"
))# Set working directory to project root
library(here)
here::i_am("analysis/da_ana.Rmd")
# Render the analysis
rmarkdown::render("analysis/da_ana.Rmd")The analysis uses survey data from three sources:
- San Francisco voters (n=866): Local residents during the Boudin recall
- IGS California Poll: Statewide representative sample
- National Lucid sample: Cross-validation of findings
Sample data provided for code testing. Full data available upon request.
@article{yogev2025recall,
title={Prosecutor Recall Elections and Public Opinion},
author={Yogev, Dvir},
journal={Public Opinion Quarterly},
year={2025},
publisher={Oxford University Press}
}Dvir Yogev
Post-Doctoral Researcher
Criminal Law & Justice Center, UC Berkeley Law
MIT License - see LICENSE for details.