Obtains predictive intervals on a test dataset based on an cfpac object from link{cfsens_cf_pac}.

# S3 method for cfpac
predict(
  obj,
  X_test,
  estimand = c("treated", "control"),
  type = c("ate", "att", "atc"),
  bnd_type = c("wsr", "hoeffding"),
  num_grids = 1000,
  rand_ind = NULL,
  wsr_seed = 24601
)

Arguments

obj

an object of class cfpac.

X_test

testing covariates.

estimand

the inferential target that takes value in {"treated", "control"}. See details.

type

the type of inference target. Takes value in {"ate", "att", "atc"}. See details.

Value

predictive intervals. A data.frame that contains nrow(X_test) rows and two columns: "Y_hi" refers the upper bound and "Y_lo" the lower bound.

Details

When type = "treated", predictive intervals for Y(1) are constructed; when type = "control", predictive intervals for Y(0) are constructed.

When type = "ate", the inference is valid unconditionally; when type = "att", the inference is valid conditional on T=1, and Y1_test should be provided; when type = "atc", the inference is valid conditional on T=0, and Y0_test should be provided.