ess_rand¶
- ess_rand(designs, y_mat, *, contrast=(1.0, -1.0))[source]¶
Randomization-based effective sample size of each design.
For each design, the difference-in-means estimator of the contrast is computed on every assignment, and its variance across assignments is the design’s precision.
- Parameters:
designs (Sequence[np.ndarray]) – One array per design, each with one assignment per row.
y_mat (np.ndarray) – Potential outcomes, one column per group in sorted label order.
contrast (Sequence[float]) – Coefficient for each group.
- Returns:
ESS per design; the most precise design has ESS equal to N.
- Return type:
np.ndarray