StatsPAI_skill

Estimate treatment effects and run causal inference diagnostics in Python.

203|27|Updated Apr 19, 2026
One-click install
npx skills add https://github.com/franklee16/academic-research-skills --skill statspai-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: StatsPAI_skill
Source: https://github.com/franklee16/academic-research-skills/tree/main/data-analysis/StatsPAI_skill
Command: npx skills add https://github.com/franklee16/academic-research-skills --skill statspai-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you estimate treatment effects and run robust causal inference without stitching together many separate tools, by guiding an end-to-end empirical workflow in Python from diagnostics to estimation to robustness.

Core Features & Use Cases

  • Full empirical causal pipeline: descriptive stats and balance checks, pre-flight diagnostics, estimand-first research question specification, estimator selection, estimation, and robustness.
  • Estimand-first decisioning: uses a research-question DSL to formalize population, treatment, outcome, estimand, and design choices (e.g., “DID vs RD vs IV?”).
  • LLM-assisted DAG discovery: proposes, validates, and constrains causal DAGs to inform identification reasoning.
  • Broad method coverage: OLS, IV, DID (including staggered-DID workflows), RDD, PSM, SCM, modern ML causal inference (DML, causal forests, meta-learners, TMLE), and text-as-treatment.
  • Structured, agent-friendly outputs: returns self-describing result objects with summaries, diagnostics, and export/citation helpers.

Quick Start

Ask the AI to: run a full StatsPAI causal analysis for my dataset to estimate the treatment effect of training on wage using DID, including balance/pre-flight diagnostics, the estimand-first plan, estimation, and robustness checks.

Frequently Asked Questions about StatsPAI_skill

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

FAQPage Schema
How do I run causal inference end-to-end in Python without stitching together multiple packages?

Perform end-to-end causal inference by importing a unified API that takes an analysis-ready DataFrame and returns structured result objects with diagnostics and robustness outputs, covering everything from balance checks to estimation.

What's the best way to estimate treatment effects using DID, RD, or IV in econometrics?

The best way to estimate treatment effects is using an estimand-first decisioning approach that formalizes your research question and guides estimator selection. You can apply methods like DID, RD, or IV through a structured workflow that includes diagnostics and robustness checks.

Can I use machine learning for causal inference alongside traditional econometrics?

Yes, ML-based causal inference is supported alongside traditional econometrics. You can apply Double Machine Learning, causal forests, meta-learners, and TMLE while using LLM-assisted DAG discovery to inform identification reasoning.

Does Python support staggered adoption designs and synthetic control methods for panel data?

Yes, Python supports staggered adoption designs and synthetic control methods for panel data. The workflow includes staggerated-DID workflows, Propensity Score Matching, and Synthetic Control Method estimation with structured diagnostics and robustness outputs.

How do I validate causal DAGs and specification choices before estimating treatment effects?

You validate causal DAGs and specification choices through pre-flight diagnostics and LLM-assisted DAG discovery. The workflow proposes, validates, and constrains causal DAGs to inform identification reasoning before running the final estimations and robustness checks.

What is an estimand-first research question DSL in causal inference?

An estimand-first research question DSL is a domain-specific language used to formalize population, treatment, outcome, estimand, and design choices. It guides estimator selection, such as deciding between DID vs RD vs IV, before running the actual estimation.