synthetic-control

Estimate counterfactual outcomes for a single treated unit using donor-weight optimization.

33|6|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill synthetic-control-xjtulyc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: synthetic-control
Source: https://github.com/xjtulyc/awesome-rosetta-skills/tree/main/skills/07-economics/synthetic-control
Command: npx skills add https://github.com/xjtulyc/awesome-rosetta-skills --skill synthetic-control-xjtulyc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, scipy, matplotlib.

What problem does it solve?

This Skill solves how to estimate the causal effect of a policy or intervention for a single treated unit when you have a time series and a pool of comparable untreated donor units.

Core Features & Use Cases

  • Outcome-path synthetic control: Constructs donor weights to match the treated unit’s pre-treatment outcome trajectory.
  • Gap-based treatment effect estimation: Computes the post-treatment effect as the difference between actual and synthetic outcomes.
  • Permutation placebo inference: Assesses significance using in-space placebo tests with a RMSPE post/pre ratio and permutation p-values.
  • Use Case: Estimate the impact of a state policy adoption on an economic outcome by selecting an appropriate weighted combination of other states and plotting/validating the pre-period fit before interpreting the post-period gap.

Quick Start

Use the synthetic-control skill to estimate a policy’s effect for a single treated country by fitting synthetic weights on the pre-treatment outcome path and then running in-space placebo tests to compute a permutation p-value.

Frequently Asked Questions about synthetic-control

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I estimate causal policy effects using synthetic control with panel data?▼

Estimate causal policy effects using synthetic control by optimizing donor weights to match the pre-treatment outcome trajectory of a single treated unit in panel data, then computing the post-treatment gap between actual and synthetic outcomes.

What is permutation placebo inference and how does it validate synthetic control results?▼

Permutation placebo inference validates synthetic control results by running in-space placebo tests across donor units, computing RMSPE post/pre ratios, and generating a permutation p-value to assess the statistical significance of the estimated treatment effect.

When should I use synthetic control instead of difference-in-differences for policy evaluation?▼

Use synthetic control for policy evaluation when you have a single treated unit, a long pre-treatment window, and a donor pool of comparable untreated units, constructing a weighted counterfactual rather than relying on parallel trends assumptions.

How do I run in-space placebo tests to compute permutation p-values for a synthetic control?▼

Run in-space placebo tests by iteratively applying the synthetic control method to each untreated donor unit, calculating their RMSPE post/pre ratios, and deriving a permutation p-value from the resulting distribution to infer significance.

Do I need long pre-treatment time series data to build a valid synthetic counterfactual?▼

Yes, building a valid synthetic counterfactual requires long pre-treatment time series data to optimize donor weights that accurately minimize the pre-treatment outcome mismatch for the treated unit.

Can I use pandas and numpy to implement synthetic control weight optimization for causal inference?▼

Yes, you can use pandas and numpy for synthetic control weight optimization in causal inference, applying nonnegative weights that sum to one to minimize pre-treatment outcome mismatch and estimate counterfactual outcomes.