Using Machine Learning to Estimate Causal Effects from Observational Data I would like to use machine learning to predict a categorical (ordinal, multi-class) outcome variable from a cross-sectional dataset with about 20,000 observations and 300 features. Importantly, I need to be able to make inferences about the causal effect of specific features.
I have come across the EconML package but am unsure whether I can use it for the type of data I have (observational, not experimental). Could someone please point me to an appropriate estimation method that is either available in EconML or in some other package?
 A: A promising technique for estimating causal effects using machine learning is targeted minimum loss-based estimation (TMLE). There are several R packages, but for most cases, tmle does the job. In a recent competition to estimate causal effects in a variety of scenarios, TMLE was among the best performers. How it works is a bit complicated, but this paper does a great job of explaining it simply and clearly.
Basically, it estimates a parametric model for the counterfactual outcomes, then de-biases the estimated counterfactuals using machine learning and propensity scores. The propensity scores themselves can also be estimated using machine learning. This all makes the method highly robust to functional form assumptions and is doubly robust (in that if either the estimated counterfactuals or the propensity scores are correct, the effect will be unbiased). It relies on the convergence of certain functions to the truth, and to help ensure convergence, it uses SuperLearner, a machine learning stacking algorithm that combines the strengths of many machine learning algorithms of the user's choice. On top of all of this, TMLE has methods for valid inference despite the heavy use of machine learning. It might be useful in your case with so many features but a good sample size.
A: I can recommend recommend (disclaimer: I m one of the authors) to look at Kelly, Kong, Goerg (2022) on "Predictive State Propensity Subclassification (PSPS): A causal inference algorithm for data-driven propensity score stratification".  It's a fully probabilistic framework for causal inference by learning causal representations in the predictive state space for Pr(outcome | treatment, features).  See paper for details.
For a ready to go TensorFlow keras implementation see https://github.com/gmgeorg/pypsps with code examples and notebook case studies.
