ustat_var.makec.makec
- ustat_var.makec.makec(X, Y, w=None)
Generates C-weights for U-statistic estimator. The function can deal with the case when there is only one product pair across the outcomes. But it cannot deal with the case when a row in either of the two arrays X and Y is completely empty.
- Parameters:
X (array) – J-by-\(\operatorname{max}(T_j)\) array containing data/residuals for outcome X
Y (array) – J-by-\(\operatorname{max}(T_j)\) array containing data/residuals for outcome Y.
w (array) – J-by-1 array containing row-wise/teacher-level weights (optional).
- Returns:
First array contains C-weights for specific teachers (i.e. weight when \(j(i) = j(k)\)), and second element contains array of cross-term C-weights (i.e. weight when \(j(i) \neq j(k)\))
- Return type:
list of ndarray