Create counterfactual datasets in the population for compliers and noncompliers. Then predict potential outcomes from counterfactuals.
pattc_counterfactuals(
pop.data,
response.mod,
ID = NULL,
cluster = NULL,
binary.preds = FALSE
)data.frame object of predicted outcomes of counterfactual groups.
population dataset
trained model from response_model.
string fir identifier variable
string for clustering variable
logical specifying whether predicted outcomes are proportions or binary (0-1).