causal-identification

Validates causal identification strategies and diagnostics before estimating treatment effects.

2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/lancegui/causal-powers --skill causal-identification-lancegui
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: causal-identification
Source: https://github.com/lancegui/causal-powers/tree/main/evals/prompt-pilot-state-did/transcripts/current/stage1/instructions/skills/causal-identification
Command: npx skills add https://github.com/lancegui/causal-powers --skill causal-identification-lancegui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Regression coefficients are often reported as causal effects without a stated identification strategy, producing confident but confounded results. This Skill forces the identification assumptions to be named and tested before estimation, so silent confounding is caught before it reaches a result. ## Core Features & Use Cases - Design Card gate: Requires a signed-off design document stating the estimand, source of variation, untestable assumption, diagnostics, and primary specification before any model is estimated. - Per-design diagnostics: Covers difference-in-differences, event studies, IV, regression discontinuity, matching, panel fixed effects, synthetic control, and ML-based estimators, with the specific testable implications of each (pre-trends, first-stage F, McCrary density test, covariate balance). - Bad-control and robustness discipline: Flags post-treatment controls, colliders, and selection on the outcome, and gates placebo/sensitivity checks behind a user-approved shortlist of roughly three threat-relevant tests. - Use Case: A researcher asks to "run a DiD" on staggered state policy adoptions. The Skill requires a Design Card, warns that vanilla TWFE is biased under staggered timing, and directs estimation to Callaway–Sant'Anna or Sun–Abraham estimators with pre-trend and anticipation diagnostics. ## Quick Start Ask the assistant to estimate the causal effect of a policy on an outcome using difference-in-differences and have it state the identification assumptions and diagnostics before running the regression.

Frequently Asked Questions about causal-identification

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

FAQPage Schema
How do I estimate a causal effect with difference-in-differences?▼

State the parallel trends assumption, test pre-treatment trends and anticipation, then estimate with clustering at the treated-unit level. For staggered adoption timing, use Callaway–Sant'Anna, Sun–Abraham, or did2s instead of two-way fixed effects, which is biased by forbidden comparisons.

What diagnostics should I run before trusting an IV estimate?▼

Report the first-stage F statistic to check instrument relevance, using weak-instrument-robust inference like Anderson–Rubin when it is low. Exclusion cannot be tested, so it must be argued substantively, and monotonicity is required to interpret the estimate as a LATE.

Can I use this with Python or only R?▼

Yes, it covers R, Python, and Julia. R has the most mature tooling (fixest, did, rdrobust, MatchIt); Python uses linearmodels, pyfixest, and econml; Julia's FixedEffectModels.jl covers FE and IV but lacks staggered DiD and RDD implementations.

Why is adding more controls not making my regression causal?▼

Controls only address confounders you observed and named; post-treatment controls, mediators, and colliders can create bias rather than remove it. Every control needs a confounding story showing it was determined before treatment, not just a desire to be thorough.

When should I not use plain two-way fixed effects for DiD?▼

Avoid TWFE when treatment timing is staggered across units, because it makes forbidden comparisons of late-treated to already-treated units and biases the estimate. Use modern estimators such as Callaway–Sant'Anna, Sun–Abraham, or Borusyak et al. instead.