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?

  • $\begingroup$ If your data is observational, how you do expect any analysis to provide causality rather than correlation? $\endgroup$
    – Henry
    May 4 '19 at 17:51
  • $\begingroup$ While with observational data we can never be as certain about causality as with RCTs, I'm under the impression that much of nonexperimental research in economics uses quasiexperimental methods such as instrumental variables to try and infer causality as well as possible. $\endgroup$ May 4 '19 at 18:11
  • $\begingroup$ You should be able to get good help on this site, but you'll need to improve the question. First, ML and causal inference typically have different goals, so why are you planning to use one to do the other? Also, if you are asking about estimation methods and software tools, it is important to first specify what model (e.g., IV) you are planning to estimate. And you need to be very specific about your research question, the nature of your variables, functional form, etc. Right now, you are asking about step 10 in the research process, without providing much information about steps 1-9. $\endgroup$
    – AlexK
    May 4 '19 at 19:02

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.

  • $\begingroup$ Excellent papers both! (+1) $\endgroup$
    – usεr11852
    May 4 '19 at 22:12
  • $\begingroup$ Thanks for the pointer. As far as I can tell TMLE only works for continuous or binary outcome variables though? My apologies if I didn't make this clear before but I'm looking to predict a multi-class outcome. $\endgroup$ May 5 '19 at 12:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.