Evaluating model specification when using the parametric g-formula in the presence of censoring