see attached files
Very nice code and flexible so you can repeat across a bunch of scenarios with various modifications. It's helpful to write out the data generating rules as equations first, before writing it out in code.
There's a small typo in the definition of local a1, in which you refer to X when I think you mean U.
The goal was to compare the bias under two different distributions of S1 (e.g., high S1 selection vs low S1 selection) and two different distributions of S2 (eg high and low S2 selection), rather than cross tab selection on s1 only, S2 only, S1 and S2, etc. The code you've set up can easily incorporate the original goal because it is quite similar.