Main function: HOIF estimators for ATE with optional sample splitting

hoif_ate(
  X,
  A,
  Y,
  mu1,
  mu0,
  pi,
  transform_method = "splines",
  basis_dim,
  inverse_method = "direct",
  m = 7,
  sample_split = FALSE,
  n_folds = 2,
  backend = "torch",
  seed = NULL,
  pure_R_code = FALSE,
  ...
)

Arguments

X

Covariate matrix (n x p)

A

Treatment vector (n x 1)

Y

Outcome vector (n x 1)

mu1

Predicted outcomes under treatment

mu0

Predicted outcomes under control

pi

Predicted propensity scores

transform_method

Character: method to transform covariates before constructing basis functions. - "splines": use basis splines expansion - "fourier": use Fourier basis expansion - "none": no transformation (use raw covariates)

basis_dim

Integer: number of basis functions to generate when using "splines" or "fourier" transformations. Higher values provide more flexible approximations but may increase variance.

inverse_method

Character: regularization method for Gram matrix inversion. - "direct": direct Moore-Penrose pseudoinverse (no regularization) - "nlshrink": nonlinear shrinkage estimator (Ledoit-Wolf type) - "corpcor": shrinkage via the corpcor package (for high-dimensional settings)

m

Maximum order for HOIF

sample_split

Logical: whether to use sample splitting. If `TRUE`, the data is split: one part for estimating the inverse Gram matrix, and the other for estimation. If `FALSE`, it corresponds to the sHOIF case (without sample splitting).

n_folds

Number of folds for sample splitting (if used)

backend

Character: "torch" (default) or "numpy"

seed

Random seed for reproducibility (for sample splitting)

...

Additional arguments passed to transform_covariates

Value

List with ATE, HOIF, and IIFF estimates

See also

compute_HOIF_test, which provides a brute-force implementation used internally for correctness checks on small datasets.