6
$\begingroup$

Suppose that the effect of some treatment $D = 0, 1$ on the outcome $Y = 0,1$ is confounded by sex $S = 0,1$. An unconfounded estimate of the causal effect of $D$ on$Y$ would see us estimate the within strata risks and then weight those by the prevalence of the strata prior to taking their difference. Mathematically, we would compute

$$ E[Y(D=d)] = \sum_s E[Y \mid D=d, S=s] P(S=s) $$

for each $d$ and then take the difference. If one were to simply write out the naive difference in means estimator, one would discover that the weights are incorrect, which is a cause of the counfounding

$$ E[Y\mid D=d] = \sum_s E[Y \mid D=d, S=s] P(S=s \mid D=D) $$

Note that through Bayes rule

$$ P(S=s \mid D=D) = \dfrac{P(D=D \mid S=S) P(S=s)}{P(D=d)} $$

which is a function of the propensity score and the correct weights $P(S=s)$. However, simply weighting the estimates of $E[Y \mid D=d]$ by the inverse of the propensity score leaves a factor of $1/P(D=d)$ in the expression for $E[Y \mid D=d]$.

Why does IPTW result in the correct estimate of the causal contrast then? I would appreciate an answer which appeals to weighted sums of expectations as I've written here. In particular, I'm hoping to demonstrate that IPTW leads to an expression similar to the first equation I've presented.


EDIT:

Here is my own attempt

Let the weights for each sum be

$$ w(s) = \dfrac{1}{\Pr(D=d \mid S=s)}$$

These are not guaranteed to sum to 1, so let's compute their sum and create new, normalized, weights.

$$ \sum_s w(s, d) = \dfrac{1}{\Pr(D=d \mid S=0)} + \dfrac{1}{\Pr(D=d \mid S=1)}$$

Finding a common denominator...

$$ \sum_s w(s, d) = \dfrac{\Pr(D=d \mid S=1) + \Pr(D=d \mid S=0)}{\Pr(D=d \mid S=1) \times \Pr(D=d \mid S=0)}$$

Now, here is where things get ugly. Let's first acknowledge that

$$ \Pr(D=d \mid S=s) = \dfrac{\Pr(S=s \mid D=d) \Pr(D=d)}{\Pr(S=s)}$$

If we replace the conditional probabilities of $D$ in numerator and denomintor, then the factor of $\Pr(D=d)$ pops out. We get one factor in the numerator and 2 in the denominator, so

$$ \sum_s w(s, d) = \dfrac{f(s, d)}{\Pr(D=d)} $$

where $f$ is the expression re-written using Bayes rule. The important part is that we get the factor of $\Pr(D=d)$ for doing so.

Now, define $\Omega(s, d) = \dfrac{w(s, d)}{\sum_s w(s, d)} = \dfrac{w(s) \Pr(D=d)}{f(s, d)} = \dfrac{\Pr(D=d)}{\Pr(D=d \mid S=s) f(s, d)} $

and so the weighted sum using $\Omega(s, d)$ as the weights has the factor which we need to cancel out the "wrong" weights in the naive difference in means.

My gut says $f(s, d) = 1$ but I'm not sure and have yet to prove so.

$\endgroup$
2
  • $\begingroup$ Demetri, does my post below answer your question? $\endgroup$
    – num_39
    Commented Jul 16 at 17:06
  • 1
    $\begingroup$ @num_39 It does, thank you $\endgroup$ Commented Jul 16 at 17:35

1 Answer 1

4
$\begingroup$

By unconfoundedness, the average treatment effect (ATE) is a weighted average of the treatment effect for each subset (male, female). Using potential outcomes notation, we can represent the average treatment effect as

$$ \tag{1} ATE = \sum \left[ E(Y_i(1) | X_j = x) - E(Y_i(0) | X_j = x) \right] P(X_j = x) $$

Note that I'm using $X$ to represent the covariate(s) on which we're conditioning while the OP uses $S$.

Now we want to show that the expectation of the inverse probability weighting estimator is identical to (1), particularly the right hand side of (1).

$$ E(Y_{i, IPW}) = \sum \left[ E(Y_i(1) | X_j = x) - E(Y_i(0) | X_j = x) \right] P(X_j = x) $$

where

$$ Y_{i, IPW} = \frac{Y_i D_i}{e(X_i)} - \frac{ Y_i (1 - D_i)}{1 - e(X_i)} = \frac{Y_i (1) D_i}{e(X_i)} - \frac{ Y_i(0) (1 - D_i)}{1 - e(X_i)} $$

and $e(X_i)$ is the propensity score such that $e(X_i) := E(D_i | Xi) = P(D_i = 1| X_i)$.

By the law of total expectation, the definition of $Y_{i, IPW}$, and the linearity of expectation

$$ \begin{aligned} E(Y_{i, IPW}) &= \sum E(Y_{i, IPW} | X_i = x) P(X_i = x) \\ &= \sum E \left( \frac{Y_i (1) D_i}{e(X_i)} - \frac{Y_i (0) (1 - D_i)}{1 - e(X_i)} | X_i = x \right) P(X_i = x) \\ &= \sum \left( E \left( \frac{Y_i (1) D_i}{e(X_i)} | X_i = x \right) - E \left( \frac{Y_i(0) (1 - D_i)}{1 - e(X_i)} | X_i = x \right) \right) P(X_i = x) \end{aligned} $$ Now notice three things.

  • First, $e(X_i) | X_i = x $ is a constants so we can pull this out of the expectation. This is because the propensity score of all units in the subset $X_i = x$ are identical.
  • Second, $E(Y_i(1) D_i | X_i = x) = E(Y_i(1)|X_i = x) E(D_i | X_i = x)$ because by unconfoundedness we know that conditional on $X_i$ the outcome is independent of treatment , i.e. $Y_i(1) | X_i \perp\!\!\!\perp D_i$. This is the key assumption that makes inverse propensity score weighting "work."
  • Third, using the definition $e(X_i) := E(D_i |X_i= x)$ we can rewrite the numerator as $E(Y_i(1)|X_i = x) e(X_i)$ and similarly for the second fraction.

This gives us

$$ \begin{aligned} E(Y_{i, IPW}) &= \sum \left( \frac{E(Y_i (1)| X_i =x ) e(X_i)}{e(X_i)} -\frac{E(Y_i(0) | X_i= x) (1 - e(X_i)) }{1 - e(X_i)} \right) P(X_i = x) \\ &=\sum \left( E(Y_i(1) | X_j = x) - E(Y_i(0) | X_j = x) \right) P(X_j = x) \end{aligned} $$ which is what we wanted to show.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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