Treatment and control group balance in ATE estimation with regression I have a (probably) stupid question but I am still actively learning about causal inference and maybe I am not getting how the pieces do connect together.
I came across different methods for estimating ATE: regression-based, pair matching, propensity score matching and IPTW. While I understand how to reach unconfoundedness with matching, PS and IPTW by sort of rebalancing the differences in covariates between treatment levels by reconducting the observational study to sort of a randomized trial, I do not get how regressing the outcome on the treatment can be done without worrying about unconfoundedness.
I would be glad if you could clarify my doubts, maybe adding some practical references (R, Python) to see how ATE is computed using the aforementioned techniques.
Thank you in advance.

There are two parts to this question:

*

*Regressing the outcome on the treatment in a way that corrects for any confounding.

*Computing the ATE from the regression.

I'm going to assume that you know how to do #2, or can fairly easily google that. #1  is a bit trickier. I will answer from the perspective of Pearl's causal inference framework: Directed Acyclic Graphs (DAGs).
In the final analysis, how you regress depends on what other variables are present and how they are related causally. Once you know that, you can, using Pearl's ideas about adjusting for confounders, correctly regress the outcome on the treatment by including or not including the variables present in the regression. In the linear regression setting, you "adjust for" a variable by including it on the RHS, so that in the equation
$$Y=aX+bZ+\varepsilon,$$
we would have adjusted for $Z$ in the regression of outcome $Y$ on treatment $X.$
In the DAG framework, we say that variable $X$ causing $Y$ is modeled by $X\to Y.$ Simple and intuitive. But when do we include $Z$ in the regression? When $Z$ sets up a backdoor path in the DAG, we must include it (adjust for it) in the regression. If $Z$ is a mediator, we should emphatically NOT adjust for it in the regression. Here is the confounding case:

A backdoor path is an indirect path from $X$ to $Y$ starting with an arrow in to $X$. So this qualifies as a backdoor path, and it is not blocked with any colliders (colliders look like $A\to B\leftarrow C$), so we must include $Z$ in the regression to get the correct predictions.
Here is the mediator case:

In this case, $Z$ does not set up a backdoor path, because there are no arrows going into $X.$ Part of the causal effect of $X$ on $Y$ is mediated through $Z:$ therefore, adjusting for $Z$ would produce an incorrect result.
This all begs the question: how do you come up with the right DAG? Well, you can rely on Subject Matter Experts, common sense, etc. There are ways to test whether your dataset is consistent with a particular DAG (up to a point: see Theorem 1.2.8 in Pearl's Causality: Models, Reasoning, and Inference, 2nd Ed., on page 19, for some limitations to this). There are even ways to learn a DAG structure that is fairly close to the correct one from the data. That is a very advanced algorithm.
