EconML icon indicating copy to clipboard operation
EconML copied to clipboard

How to add hierarchical/multi-level model aspects to Multi-Investment Attribution Case Study

Open dclengacher opened this issue 2 years ago • 0 comments

All of the use cases of causal modeling I'm involved include a geographic component in which it's critical to be able to simultaneously estimate both parent-level insights (like Total US) and child-level insights (like States). If the Multi-Investment Attribution Case Study were modified to include 2 geographic indicator columns (1 for zip code , 1 for state), and you wanted to get both global and state-level causal results, how would you do it in a way that applies partial pooling (like mixed modeling with Pymer4 does) and not just a For-loop by state?

Here is the the original Case Study excerpt. Can this formulation (or the data) be modified to allow mixed modeling?

Train EconML model with generic helper models

model = LinearDRLearner( model_regression=XGBRegressor(learning_rate=0.1, max_depth=3), model_propensity=XGBClassifier(learning_rate=0.1, max_depth=3, objective="multi:softprob"), random_state=1, )

Specify final stage inference type and fit model

model.fit(Y=Y, T=T, X=X, W=W, inference="statsmodels")

dclengacher avatar Dec 10 '23 16:12 dclengacher