Assume I have 1000 observations and I’m running the following regression
I want to generate a loop that randomly chooses 750 observations from my dataset (without replacement) and run the regression with bootstrapped errors. But I also want to do the same with the 250 observations that were not selected. I want to repeat this 1000 times. At the end, I want to see two regressions with bootstrapped errors, one with randomly selected 750 variables, and one with the rest of the observations. I’m not really sure if this is doable. Can you help me with this?
Thanks.
Code:
reg y x1 x2
Thanks.

Comment