5 Main Function:
hoif_ate()
The primary interface for computing HOIF estimators.
5.1 Arguments
- X: Covariate matrix (\(n \times p\))
- A: Treatment vector (0 or 1)
- Y: Outcome vector
- mu1, mu0: Predicted outcomes under treatment and control
- pi: Predicted propensity scores
- transform_method: Covariate transformation method
"none": No transformation (use raw covariates)"splines": B-splines basis expansion"fourier": Fourier basis expansion
- basis_dim: Number of basis functions (required if using splines or Fourier)
- inverse_method: Method for Gram matrix inversion
"direct": Cholesky-based inversion (Moore-Penrose fallback)"nlshrink": Nonlinear shrinkage (Ledoit-Wolf)"corpcor": Shrinkage via corpcor package
- m: Maximum order (any order for the Python backend, 2-6 for pure R)
- sample_split: Logical; whether to cross-fit the Gram matrix against the U-statistics (eHOIF vs sHOIF, see the Sample Splitting section)
- n_folds: Number of folds for sample splitting
- backend:
"torch"(default) or"numpy"for the Python backend - dtype: Numeric precision of the Python backend
(
"float32","float64", orNULLfor automatic selection) - pure_R_code: Use pure R implementation (limited to order 6)
- seed: Random seed for reproducibility
5.2 Return Value
A list of class "hoif_ate" containing:
- ATE: Vector of ATE estimates for orders 2 to m
- HOIF1: Vector of treatment arm HOIF estimates
- HOIF0: Vector of control arm HOIF estimates
- IIFF1: Vector of treatment arm incremental influence function terms
- IIFF0: Vector of control arm incremental influence function terms
- orders: Vector of orders (2:m)
- convergence_data: Data frame for plotting