Dear Stata Experts,
Hope all is well. I'm trying to do a placebo test with this purpose: Randomly assign a fake IV called "origin" to an existing dataset and run logit regression on "origin" immediately, then repeat this process 1,000 times, and lastly plot the histogram distribution of the fake origin effect. Here is what I'm doing:
gen origin= (runiform() <= 0.5 )
logit DV origin, vce(r)
bootstrap _b, reps(1000) saving(my_results_file, replace): logit DV origin , vce(r)
use my_results_file, clear
hist _bs_1
However, I feel like the above syntax only randomly generated the fake "origin" IV ONCE and then ran the logit regression repeatedly 1,000 times. That's not what I wanted in the Placebo Test. I wonder if anyone can help me with this. Thanks so much!
0 Response to A question on how to bootstrap placebo test 1,000 times
Post a Comment