Base R randomization test: difference in means + optional fiducial interval
randomization_test_R(obsW, obsY, allW, findFI = FALSE, alpha = 0.05)A list with p_value, tau_obs, and (optionally) FI if `findFI=TRUE`.
Observed assignment (0/1).
Observed outcome vector.
Matrix of candidate random assignments (rows = assignments).
Logical, whether to compute fiducial interval as well.
Significance level (default 0.05).