Standard errors account for estimated group cutoffs and assume continuous
treatment effects at the boundaries. Ties are broken randomly; use
set.seed() for reproducibility. Both arms need at least two
observations. Empty group arms return NA standard errors.
References
Imai and Li (2022). “Statistical Inference for Heterogeneous Treatment Effects Discovered by Generic Machine Learning in Randomized Experiments”,