G-computation of average treatment effects on the treated and the untreated