Estimating and evaluating counterfactual prediction models