calculate_u_statistics_pure_r_six.RdThis function serves as a core computational component in higher-order influence function (HOIF) estimators in pure R code.
calculate_u_statistics_pure_r_six(Vector_1, Vector_2, A1, A2, A3, A4, A5)A named list containing numeric U-statistic estimates:
Second-order U-statistic
Third-order U-statistic
Fourth-order U-statistic
Fifth-order U-statistic
Sixth-order U-statistic
Internally, the function constructs kernel matrices for orders 2 through 6 using recursive matrix operations and removes diagonal contributions to ensure degenerate U-statistics.
All diagonal elements of intermediate kernel matrices are removed to avoid self-interactions. Matrix multiplications are performed via `eigenMapMatMult()` and element-wise products via `hadamard()`. The exact formula of the output is: $$ \mathbb{U}_{n,m} = \frac{1}{\binom{n}{m} m!} \sum_{i_1 \ne \cdots \ne i_m} Vector_1[i_1] \cdot A1[i_1,i_2] \cdot A1[i_2,i_3] \cdots A1[i_{m-1},i_{m}] \cdot Vector_2[i_{m}] $$