This repository aims to provide a comprehensive collection of methods for performing causal inference, including experimental designs, statistical methods, and advanced machine learning techniques. Each method will be implemented and documented with examples.
- Introduction
- Methods
- Experimental Methods
- Quasi-Experimental Methods
- Matching and Reweighting Methods
- Graphical and Structural Methods
- Machine Learning and Advanced Statistical Methods
- Time-Series and Panel Data Methods
- Mediation and Moderation Analysis
- Sensitivity Analysis and Robustness Checks
- Advanced Reweighting and Balancing Methods
- Instrumental Variable Extensions
- Subgroup Analysis and Heterogeneity
- Other Methods
- Emerging and Hybrid Methods
- Causal Inference Software Tools
- Development Plan
- Contributing
- License
Causal inference aims to identify causal relationships between variables, going beyond simple correlations. This repository contains implementations of various causal inference methods, with examples and documentation for each method.
- Randomized Controlled Trials (RCTs)
- Field Experiments
- Lab Experiments
- Natural Experiments
- Instrumental Variables (IV)
- Difference-in-Differences (DiD)
- Regression Discontinuity Design (RDD)
- Interrupted Time Series Analysis
- Propensity Score Matching (PSM)
- Covariate Matching
- Inverse Probability Weighting (IPW)
- Genetic Matching
- Entropy Balancing
- Mahalanobis Distance Matching
- Coarsened Exact Matching (CEM)
- Nearest Neighbor Matching
- Causal Diagrams (Directed Acyclic Graphs - DAGs)
- Structural Equation Modeling (SEM)
- Path Analysis
- Causal Forests
- Bayesian Causal Inference
- Double Machine Learning (DML)
- Targeted Maximum Likelihood Estimation (TMLE)
- Synthetic Control Method
- G-computation
- Marginal Structural Models (MSM)
- Causal Bayesian Networks
- Causal Discovery Algorithms (references: PC Algorithm, FCI Algorithm)
- Fixed Effects Models
- Random Effects Models
- Dynamic Panel Models
- Panel Data Matching
- Mediation Analysis
- Moderation Analysis
- Moderated Mediation Analysis
- Sensitivity Analysis
- Bounds Analysis
- Placebo Tests
- Permutation Tests
- Inverse Probability of Treatment Weighting (IPTW)
- Standardized Mortality Ratio Weighting (SMRW)
- Calibration Weighting
- Two-Stage Least Squares (2SLS)
- Generalized Method of Moments (GMM)
- Limited Information Maximum Likelihood (LIML)
- Control Function Approach
- Subgroup Analysis
- Quantile Treatment Effects (QTE)
- Heterogeneous Treatment Effects Analysis
- Matching with Multiple Controls
- Propensity Score Stratification
- Propensity Score Regression Adjustment
- Cross-Over Designs
- Regression Kink Design
- Fuzzy Regression Discontinuity Design
- Sharp Regression Discontinuity Design
- Network Causal Inference
- Spatial Causal Inference
- Integrative Causal Inference (combining multiple methods)
- Epidemiological Software (references: DAGitty)
- Statistical Packages (references: R's
MatchIt
,twang
for IPW,Zelig
, Python'scausalml
,DoWhy
) - Machine Learning Libraries (references:
econML
,causalForest
in R)
The development plan involves implementing each method step-by-step, providing detailed documentation and examples for each. Here is a proposed plan:
-
Initial Setup
- Set up the repository structure.
- Define coding standards and guidelines.
-
Phase 1: Basic Methods
- Implement and document basic methods such as RCTs, IV, and DiD.
- Provide examples and use cases for each method.
-
Phase 2: Intermediate Methods
- Implement matching and reweighting methods.
- Include detailed documentation and examples.
-
Phase 3: Advanced Methods
- Implement graphical and structural methods, machine learning methods, and time-series methods.
- Provide complex examples and case studies.
-
Phase 4: Robustness and Sensitivity Analysis
- Implement sensitivity analysis and robustness checks.
- Document common pitfalls and how to address them.
-
Phase 5: Emerging Methods
- Implement and document emerging and hybrid methods.
- Include innovative applications and case studies.
-
Final Phase: Integration and Testing
- Integrate all methods into a cohesive framework.
- Conduct comprehensive testing and validation.
- Prepare final documentation and examples.
We welcome contributions from the community. Please follow our contributing guidelines to get started.
This project is licensed under the MIT License - see the LICENSE file for details.