Skip to content

Survey experiment on prosecutor recall elections - POQ publication replication materials

License

Notifications You must be signed in to change notification settings

dyo2112/prosecutor-recall-study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prosecutor Recall Elections and Public Opinion

R Publication License: MIT

Overview

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.

Key Findings

  • 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

Technical Highlights

Component Technologies
Statistical Analysis R (estimatr, modelsummary)
Machine Learning randomForest for voter classification
Visualization ggplot2, custom theme development
Survey Methods Experimental design, survey weighting

Project Structure

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

Experimental Design

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

Key Analyses

Treatment Effects by Recall Vote

# 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)
)

Random Forest Classification

# Predict recall vote using policy preferences
rf <- randomForest(
  out_vote ~ out2 + sal + puni_t + prog + sym + rr,
  ntree = 2000,
  mtry = 1,
  data = match_da
)

Installation

# Install required packages
install.packages(c(
  "here", "tidyverse", "estimatr", "modelsummary",
  "randomForest", "ggplot2", "haven"
))

Replication

# Set working directory to project root
library(here)
here::i_am("analysis/da_ana.Rmd")

# Render the analysis
rmarkdown::render("analysis/da_ana.Rmd")

Data

The analysis uses survey data from three sources:

  1. San Francisco voters (n=866): Local residents during the Boudin recall
  2. IGS California Poll: Statewide representative sample
  3. National Lucid sample: Cross-validation of findings

Sample data provided for code testing. Full data available upon request.

Citation

@article{yogev2025recall,
  title={Prosecutor Recall Elections and Public Opinion},
  author={Yogev, Dvir},
  journal={Public Opinion Quarterly},
  year={2025},
  publisher={Oxford University Press}
}

Author

Dvir Yogev
Post-Doctoral Researcher
Criminal Law & Justice Center, UC Berkeley Law

License

MIT License - see LICENSE for details.

About

Survey experiment on prosecutor recall elections - POQ publication replication materials

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published