Hello,

We are trying to run a placebo test for our model and to do that we wish to randomly shuffle our Y variable, keeping the remaining dataset unchanged (such that the association between Y and the X's becomes random). We found the "shufflevar" command particularly useful to do this.

However, we wish to repeat this analysis 100 times and we observe that in every iteration "shufflevar" is shuffling the variable in the exact same way. As a result, each of the 100 iterations is just becoming an exact replica of each other. We would rather want a random shuffling each and every time, which gives us random Y's which are distinct from each other. Is there any other way in which we can just randomly mix up the values of the Y variable?

We would be extremely grateful if anyone could guide us on this! Thanks.