Yiqing Xu

Yiqing Xu 徐轶青

I am an Associate Professor, with tenure, in the Department of Political Science at Stanford University. I work in political methodology (applied statistics) and comparative politics. My current research interests center on causal inference with panel data, applications of AI to social science research, and comparative politics with a focus on China.

I received a PhD in Political Science from MIT in 2016, an MA in Economics from the China Center for Economic Research (CCER) at Peking University in 2010, and a BA in Economics from Fudan University in 2007. I taught at UC San Diego from 2016 to 2019. I am an associate director of the Stanford Causal Science Center (SC2).

yiqingxu [at] stanford.edu  /  CV  /  Google Scholar  /  GitHub

Portrait of Yiqing Xu

Research

Selected papers on causal inference with panel data, AI for social science, and Chinese politics. All papers.

Scaling Reproducibility: An AI-Assisted Workflow for Large-Scale Replication and Reanalysis
Scaling Reproducibility: An AI-Assisted Workflow for Large-Scale Replication and Reanalysis
Leo Yang Yang, Yiqing Xu
Working paper, 2026
arXiv / demo

An AI-assisted workflow replicating hundreds of political science studies finds full-paper reproducibility rose from 29.6% to 79.8% after journals adopted DA-RT. abstract

Selection, Stability, and Shock: Political Attitudes of Chinese Students at Home and Abroad
Selection, Stability, and Shock: Political Attitudes of Chinese Students at Home and Abroad
Yingjie Fan, Jennifer Pan, Yiqing Xu
British Journal of Political Science, 2026
paper / data / Economist

Chinese students who go to the US are more liberal before they leave, and ideology stays stable through college wherever they study. abstract

A Practical Guide to Estimating Conditional Marginal Effects: Modern Approaches
A Practical Guide to Estimating Conditional Marginal Effects: Modern Approaches
Jiehan Liu, Ziyi Liu, Yiqing Xu
Elements in Quantitative and Computational Methods for the Social Sciences, forthcoming
SSRN / arXiv / software / summary

Kernel, AIPW-Lasso and double machine learning estimators, all in the interflex R package, estimate how treatment effects vary with a moderating variable. abstract

Causal Panel Analysis under Parallel Trends: Lessons from a Large Reanalysis Study
Causal Panel Analysis under Parallel Trends: Lessons from a Large Reanalysis Study
Albert Chiu, Xingchen Lan, Ziyi Liu, Yiqing Xu
American Political Science Review, 2026
PDF / SSRN / arXiv / appendix / data / code / tutorial / slides / erratum

In 49 reanalyzed panel studies, modern-DID estimators give similar but highly variable results, and many studies lack parallel-trends evidence or power. abstract

Comparing Experimental and Nonexperimental Methods: What Lessons Have We Learned Four Decades After LaLonde (1986)?
Comparing Experimental and Nonexperimental Methods: What Lessons Have We Learned Four Decades After LaLonde (1986)?
Guido W. Imbens, Yiqing Xu
Journal of Economic Perspectives, 2025
paper / PDF / SSRN / arXiv / appendix / data / replication / slides

With enough covariate overlap, modern methods give stable estimates on the LaLonde data, but only validation exercises show whether they are causal. abstract

How Much Should We Trust Instrumental Variable Estimates in Political Science? Practical Advice Based on 67 Replicated Studies
How Much Should We Trust Instrumental Variable Estimates in Political Science? Practical Advice Based on 67 Replicated Studies
Apoorva Lal, Mackenzie Lockhart, Yiqing Xu, Ziwen Zu
Political Analysis, 2024
paper / arXiv / appendix / data / code / software / tutorial / slides / erratum

In 67 replicated instrumental variable studies, instrument strength is often overestimated, uncertainty is understated, and 2SLS estimates usually exceed OLS estimates. abstract

AI tools

ReproAI
ReproAI
An AI assistant for reproducible replication packages — it flags what a reproducibility check would catch, before you submit.
site / paper / GitHub
StatsClaw
StatsClaw
A multi-agent, AI-collaborative workflow for building, testing, translating, and maintaining statistical software — R, Python, C++, Julia, and Stata.
site / paper / GitHub

Software

R and Stata packages for panel data and other causal inference problems. All software.

fect
fect: Fixed Effect Counterfactual Estimators

fect implements a group of counterfactual estimators for causal inference using panel data with binary treatments, including interactive fixed effects and matrix completion methods. It also offers several diagnostic tests, such as a placebo test (for no pre-trends).

R / Stata / Python / Paper / Slides
interflex
interflex: Flexibly Estimating Conditional Marginal Effects

interflex estimates and visualizes conditional marginal effects and performs diagnostics. It is the winner of the Best Statistical Software Award from the Society for Political Methodology for 2023.

R / Stata / Paper
panelView
panelView: Visualizing Panel Data

panelView provides four functions: (1) visualize treatment and missingness in panel data; (2) plot variables over time; (3) show bivariate relationships by unit or in aggregate; (4) display multi-way fixed effects as a k-partite graph, identifying components, singletons, and duplicates.

R / Stata / Paper

Teaching

Lecture slides, code and data, free to reuse. All teaching.

Short Course on Causal Inference with Panel Data
Short Course on Causal Inference with Panel Data
Short course, first taught at Waseda University, 2026
Six lectures on causal inference with panel data, from two-way fixed effects to heterogeneity-robust DID, synthetic control and latent factor models, with R code in panelView and fect.
syllabus / course site / GitHub
POLI 450A. Political Methodology I
POLI 450A. Political Methodology I
Stanford, graduate
A graduate introduction to regression and the probability and statistics behind it; the first course in Stanford PoliSci’s four-course methods sequence.
syllabus / course site / GitHub / YouTube
POLI 158. AI & Politics
POLI 158. AI & Politics
Stanford, undergraduate
Co-taught with Simone Paci, the course pairs how AI systems work and how to use them well with the politics of AI, from labor markets and elections to data centers and chips; students design a project that uses or studies AI on a social or political problem.
syllabus / course site

Honors

The full list is in the CV.