Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIPW formula equivalent to what's in the literature? #166

Closed
sergeyf opened this issue Apr 4, 2022 · 2 comments
Closed

AIPW formula equivalent to what's in the literature? #166

sergeyf opened this issue Apr 4, 2022 · 2 comments

Comments

@sergeyf
Copy link

sergeyf commented Apr 4, 2022

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.

@pzivich
Copy link
Owner

pzivich commented Apr 4, 2022

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

@sergeyf
Copy link
Author

sergeyf commented Apr 4, 2022

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

@sergeyf sergeyf closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants