compute_HOIF_test.RdComputes the order-m higher-order influence function (HOIF) term
using an explicit enumeration of all ordered index tuples.
compute_HOIF_test(
X,
A,
Y,
mu1,
mu0,
pi,
m,
sample_splitting = 0,
n_folds = 2,
seed
)Covariate matrix (n × p).
Binary treatment indicator vector.
Outcome vector.
Estimated outcome regression under treatment.
Estimated outcome regression under control.
Estimated propensity scores.
Order of the HOIF term.
Whether to use K-fold sample splitting (0 = no).
Number of folds for sample splitting.
Random seed for reproducibility.
A list with elements:
Order-m influence function term for treated units
Order-m influence function term for control units
🚨 **This implementation is intentionally naive and is provided solely for validation and debugging purposes.** It should only be used on very small datasets to verify the correctness of optimized implementations.
The computational complexity grows factorially with both sample size and
order m.
This function directly implements the combinatorial definition of the HOIF using full enumeration of index permutations. Matrix inverses are computed explicitly and no numerical stabilization is included.
This function is part of the package's **internal test infrastructure** and should not be exported or used in applied analysis.