There is another way to estimate AIPW models. Instead of calculating IPW and E[Y|A=a....], putting it through a formula for each individual, then taking the mean. You can instead weight the regression model for E[Y|A=a,...] by the corresponding IPW. Both approaches should give the same answer (I haven't read anything that recommends either over the other)
I don't plan on implementing this anytime soon (all my implementations of AIPW use that first approach). Basically, you fit a weighted regression g-formula (weighted by IPW) then predict as usual and take the average of the unweighted(?) sample
There is another way to estimate AIPW models. Instead of calculating IPW and E[Y|A=a....], putting it through a formula for each individual, then taking the mean. You can instead weight the regression model for E[Y|A=a,...] by the corresponding IPW. Both approaches should give the same answer (I haven't read anything that recommends either over the other)
I don't plan on implementing this anytime soon (all my implementations of AIPW use that first approach). Basically, you fit a weighted regression g-formula (weighted by IPW) then predict as usual and take the average of the unweighted(?) sample