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.
Related Posts with Randomly shuffling only one variable in Stata
Convergence not achieved in technical efficiency modelHi All, When I am running my frontier model (panel data) I got the message called "convergence not …
Can I upload my dataset on this website?I have a very tough question. And the data set is tons of observations and tons of time periods. So …
Bootstrap in MontecarloI am running some issues on how to run a boostrap in a montecarlo. I need to generate 50 observation…
How to store each estimate of multiple regressions in a loop commandHi, I am running regression commands similar to the followings: logit y cov1 cov2 cov3 cov4 cov…
quantile for dynamic panelHi Do anyone read the paper of Galvao (2011) about quantile regression for dynamic panel data with f…
Subscribe to:
Post Comments (Atom)
0 Response to Randomly shuffling only one variable in Stata
Post a Comment