Before revision:  R code for the g-computation is provided.
After revision:  R code for the simulations is provided.