causal-treatment-models

Estimates average and conditional treatment effects from observational subject-level data using meta-learners and causal forests.

89|5|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill causal-treatment-models-cuhk-aim-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: causal-treatment-models
Source: https://github.com/CUHK-AIM-Group/NeuroDiscovery/tree/main/skills/causal-treatment-models
Command: npx skills add https://github.com/CUHK-AIM-Group/NeuroDiscovery --skill causal-treatment-models-cuhk-aim-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, scipy, scikit-learn, joblib, torch, econml, and includes scripts (resource) components.

What problem does it solve? Estimating treatment effects from observational data requires more than ordinary outcome prediction: you need propensity weighting, doubly robust estimation, or heterogeneous effect models to isolate the contrast Y(1) - Y(0). This Skill provides a unified CLI for fitting causal estimators on subject-level tabular data with cross-fitted held-out predictions. ## Core Features & Use Cases - Nine causal estimators: IPW, S/T/X-learners, doubly robust learning, policy learning, CausalForestDML (via econml), TARNet, and DragonNet for ATE and CATE estimation. - Cross-fitted evaluation: Produces held-out CATE predictions, fold assignments, metrics, checkpoints, and provenance manifests for reproducible analysis. - Use Case: Given a CSV of neuroimaging subjects with a binary treatment column, baseline covariates, and an outcome, run the doubly robust model to estimate individualized treatment effects and an interpretable treatment assignment policy. ## Quick Start Estimate doubly robust treatment effects from my treatment.csv file with subject, treatment, outcome, and baseline covariate columns using five-fold cross-fitting.

Frequently Asked Questions about causal-treatment-models

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

FAQPage Schema
How do I estimate CATE from observational data in Python?

Run the training CLI with a CSV containing subject, binary treatment, outcome, and pretreatment covariate columns, selecting a model such as doubly_robust or causal_forest. It produces cross-fitted held-out CATE predictions, fold assignments, and metrics in the output directory.

What is the difference between S-learner, T-learner, and X-learner?

The S-learner fits one outcome model with treatment as a feature, the T-learner fits separate models for treated and control groups, and the X-learner imputes individual effects and blends them using propensity scores. All three are available as model options in this CLI.

Does causal forest require extra installation?

Yes, the causal_forest model requires the optional econml package, which provides the CausalForestDML backend. Install it with pip install econml; the other estimators only need numpy, pandas, scipy, scikit-learn, joblib, and torch.

Can I use this for multi-arm or continuous treatments?

No, the current CLI only supports binary 0/1 treatments. Multi-arm or continuous treatment regimes are not supported, and only pretreatment covariates should be included in the feature matrix.

Why is a high predictive score not causal evidence?

Causal interpretation requires consistency, positivity, no unmeasured confounding, and defensible temporal ordering, none of which predictive accuracy establishes. Negative controls, sensitivity analyses, and randomized validation remain separate requirements.