pzivich / zEpid

Epidemiology analysis package

Home Page:http://zepid.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AIPW formula equivalent to what's in the literature?

sergeyf opened this issue · comments

Hello,

Are these formulas (https://github.com/pzivich/zEpid/blob/master/zepid/causal/utils.py#L750) the same as what's in the literature?

E.g. https://journals.sagepub.com/doi/full/10.1177/0272989X211027181 in section AIPW estimator and https://www.law.berkeley.edu/files/AIPW(1).pdf in equation (3). These two sources have E[Y|covariates, treatment=1] and E[Y|covariates, treatment=0] both always present, but it seems like py_a and py_n are only present for y1 and y0, respectively.

Thank you.

Hi @sergeyf

Yes, the literature has some variations on how exactly the AIPW estimator is written. The main difference you will see is between the IPW plus an augmentation term, or the g-computation plus an augmentation form. These two forms are equivalent (using some algebra you can go back and forth).

The formula I use is provided in Funk et al. 2011 in Table 1 (they call it doubly robust, but it is AIPW). Specifically, y1 is the 'Among X=1' row of the table and y0 is the 'Among X=0'. This works out to be the same in the articles you linked (see the general form in Table 1).

Essentially, my y1 and y0 are doing the two pieces of the AIPW estimator in the linked sources as two pieces. Then they get put together (like the equations do). Doing each piece separately makes it easier to check, allows estimation of other quantities (i.e., risk under X=1, risk ratio, odds ratio), and makes the later variance calculation easier to write

Ah thank you. I appreciate you taking the time to reply.