Implements a bias-adjusted LM-style test with random sign weighting. The base statistic is the Baltagi, Feng & Kao (2012) bias-adjusted LM: $$LM_{adj} = \sqrt{\frac{1}{N(N-1)}} \sum_{i<j} \frac{(T_{ij}-1) \hat\rho_{ij}^2 - 1}{\sqrt{2}},$$ which is asymptotically standard normal under the null. The "weighted plus" variant multiplies each pairwise term by random Rademacher weights \(w_i w_j\) and averages the absolute value across draws, producing a statistic that is robust to heteroskedasticity and sensitive to sparse alternatives.
.cd_weighted_plus(em, n_reps)