# How to model non-experimental continuous individual treatment effect on a binary target?

I have historical data of a problem that can be described as:

A person represented by features X has to wait T minutes on a queue so she can receive a treatment (which is equal for everyone), and by the end of the treatment (takes a few minutes), we observe the binary outcome of Y.

I know for a fact that features contained in X, specially seasonality features (like when she entered the queue), directly influence T, at the same time that X and T also have a direct impact on Y. I also know that X might not contain all the features that influence T, and there's no way to be sure.

I also know the "shape" of the effect of T on Y: the probability of Y=1 should decrease as T increases, and saturates at a certain point, like a logistic curve.

Now the issues: I need a robust, optimized and validated model that estimates the CATE / ITE, but how can I run hyperparameter search, feature selection or any kind of model selection if I don't know the true effect of T on Y, since I only observe one T per data point, and I also don't know if the selection bias is mitigated? How can I know if my model actually works, comparable to running cross-validation for regular classification/regression problems? And what are the most optimal techniques to be used in this scenario?

I tried making T binary by simply splitting the dataset based on a quantile threshold, and then use meta-learners from the causalml package, and then validate it using metrics like the Area Under the Uplift Curve and Qini Curve, but it doesn't seem ideal and I don't see how these metrics account for selection bias.

I also tried fitting some learners from econml package, but most of them are very slow and I couldn't get useful output. And I also used scikit-learn's PolynomialFeatures to add non-linearity and account for heterogeneity (force the interaction of T with X), and then train a simple logistic regression, which yields a seemingly reasonable result (the shape of the curve generated when varying T is according to my expectations), but it outputs more than 25k features, which makes the training process very slow, especially if using Lasso.

PS: This dataset has > 100 features and > 3M rows.

• Do you also have an attrition problem? That is, does everyone make it to the end of the waiting period? Can people arrive or return when things are less congested? At what point in the process do people learn their T? – Dimitriy V. Masterov May 29 '20 at 21:28
• Framing the problem in a chat context, so being treated means being answered: Not everyone makes it to the end of the period, but they are all answered, so they are all logged as "treated". For those cases, we will always observe Y=0 and usually a high waiting time. People can return, but they will be considered another data point, though there's a feature that indicates how many chats he opened recently, and we only observe Y=1 once in a large timeframe (> 7 days) for the same person. People learn their T once they get answered, regardless if they answer back. – loglossbb May 29 '20 at 22:20

Here $$U$$ represents unmeasured influences on $$T.$$
There is no backdoor path from $$X$$ to $$Y,$$ so you do not need to use anything like instrumental variables, the backdoor adjustment formula, or the front-door adjustment formula. This is a pure mediation problem with no confounders.
So, if you want the conditional average treatment effect (CATE) of $$X$$ on $$Y,$$ there's nothing stopping you from performing the usual calculation.
Your question, though, seems to be more concerned about not knowing what constitutes $$U,$$ the unmeasured variables. If you examine the causal effect of $$T$$ on $$Y,$$ you see that $$T\leftarrow X\to Y$$ is a backdoor path from $$T$$ to $$Y.$$ So you could use the backdoor adjustment formula, $$P(Y=y|\operatorname{do}(T=t))=\sum_x P(Y=y|T=t,X=x)\,P(X=x),$$ to get the true causal effect of $$T$$ on $$Y.$$