# A Practical Guide to Counterfactual Estimators for Causal Inference with Time-Series Cross-Sectional Data

arXiv: https://arxiv.org/abs/2107.00856 · HTML: https://mlsanity.com/paper/2107.00856/

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 2 Jul 2021.

## Built on by (most cited first, 4 of 4)

- [The Impact of Generative AI on Collaborative Open-Source Software Development: Evidence from GitHub Copilot](https://mlsanity.com/paper/2410.02091/) (2024)
- [A Comprehensive Survey on Generative Diffusion Models for Structured Data](https://mlsanity.com/paper/2306.04139/) (2023)
- [Identification of Average Treatment Effects in Nonparametric Panel Models](https://mlsanity.com/paper/2503.19873/) (2025)
- [Explainable Anomaly Detection: Counterfactual driven What-If Analysis](https://mlsanity.com/paper/2408.11935/) (2024)

## Abstract (arXiv)

This paper introduces a simple framework of counterfactual estimation for causal inference with time-series cross-sectional data, in which we estimate the average treatment effect on the treated by directly imputing counterfactual outcomes for treated observations. We discuss several novel estimators under this framework, including the fixed effects counterfactual estimator, interactive fixed effects counterfactual estimator, and matrix completion estimator. They provide more reliable causal estimates than conventional twoway fixed effects models when treatment effects are heterogeneous or unobserved time-varying confounders exist. Moreover, we propose a new dynamic treatment effects plot, along with several diagnostic tests, to help researchers gauge the validity of the identifying assumptions. We illustrate these methods with two political economy examples and develop an open-source package, fect, in both R and Stata to facilitate implementation.
