bernardodionisi/differences
difference-in-differences in Python
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository của tháng
#1 Repository của tháng
#1 Repository của tháng
📊 difference-in-differences trong Python — chính xác, linh hoạt, đa nhân
Ước lượng DiD theo Callaway-Sant'Anna, Sant'Anna-Zhao, hỗ trợ panel bất cân bằng, điều trị đa giá trị và bootstrap đa luồng.
differences là một thư viện Python dành cho thẩm mỹ học (econometrics), tập trung vào việc ước lượng và suy diễn phương pháp difference-in-differences (DiD). Dự án hỗ trợ nhiều trường hợp sử dụng phổ biến trong phân tích nhân quả, bao gồm panel cân bằng, bất cân bằng, dữ liệu điểm chéo lặp lại, điều trị nhị phân lẫn đa giá trị, cũng như các hiệu ứng điều trị khác biệt (heterogeneous treatment effects) và phân tích ba chiều (triple difference).
✨ Điểm nổi bật
- DiD đa dạng: hỗ trợ panel cân bằng, bất cân bằng và dữ liệu điểm chéo lặp lại
- Thời gian đa giai đoạn: ước lượng với hai hoặc nhiều thời điểm
- Điều trị linh hoạt: hỗ trợ cả điều trị nhị phân và đa giá trị
- Hiệu ứng khác biệt: phân tích hiệu ứng điều trị khác nhau giữa các nhóm
- Bootstrap đa luồng: sử dụng joblib (
n_jobs) để tối ưu hiệu năng - Gợi ý từ nghiên cứu: cài đặt theo các bài báo của Callaway & Sant'Anna (2021), Sant'Anna & Zhao (2020)
💡 Vì sao đáng chú ý
ndifferences không chỉ là một công cụ ước lượng DiD đơn giản — nó đưa các phương pháp tiên tiến từ nghiên cứu học thuật vào không gian Python một cách trực quan. Dự án được thiết kế để hỗ trợ cả người mới bắt đầu và người dùng nâng cao, với khả năng mở rộng qua n_jobs giúp tận dụng tối đa hiệu năng tính toán. Đặc biệt, ATTgt được thiết kế dựa trên các công trình của Callaway & Sant'Anna và Sant'Anna & Zhao, làm cho nó trở thành lựa chọn đáng tin cậy cho phân tích nhân quả trong kinh tế học và khoa học xã hội.
#Python #CausalInference #DifferenceInDifferences #Econometrics #TiniX
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
Difference-in-Differences causal inference in Python. Callaway-Sant'Anna, Synthetic DiD, Honest DiD, event studies. sklearn-like API, validated against R.
Stata-aligned econometrics for Python, with field-level validation across the documented support surface.
StatsPAI is an Agent-native Python library for causal inference and applied econometrics — unified API, broad cross-method coverage, structured result objects, machine-readable schemas, Skills, an MCP server, and R/Stata parity validation.
A Python package for causal inference using Synthetic Controls
Evidence-first AI workflow for economic and financial research: literature → identification → data → econometrics → verifiable LaTeX. 43 data sources, 58 method modules, 18 AI skills, 30 journal templates.
ALICE (Automated Learning and Intelligence for Causation and Economics) is a Microsoft Research project aimed at applying Artificial Intelligence concepts to economic decision making. One of its goals is to build a toolkit that combines state-of-the-art machine learning techniques with econometrics in order to bring automation to complex causal inference problems. To date, the ALICE Python SDK (econml) implements orthogonal machine learning algorithms such as the double machine learning work of Chernozhukov et al. This toolkit is designed to measure the causal effect of some treatment variable(s) t on an outcome variable y, controlling for a set of features x.
Causal Inference for the Brave and True. A light-hearted yet rigorous approach to learning about impact estimation and causality.
A ready-to-fork Claude Code template for academic research — papers, data analysis (R, Stata, Python), slides and teaching — with multi-agent review, enforced quality gates and replication protocols. Codex and Antigravity can use it too.