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!
Related Posts with A question on how to bootstrap placebo test 1,000 times
Using stcrreg with the mi commandHi All, After not having much of an issue with my MI (multipley imputed) data and the stccreg comma…
add legend to one of the graphs in -graph combine-Dear all statalisters, I now face a problem in dealing with drawing a combined graph with adding a l…
Bayesian approach: what to do when it differs from the frequentist approach?Dear Forum Members, I'm somewhat puzzled by the results given from 2 down-to-earth models, one usin…
How to arrange hospitalization data for sequence analysisDear Statalists, Just read a paper by Golay, P., et al., "Identifying patterns in psychiatric hospit…
Making new variable from first letter of string variableHi Statalist, Thanks for being a great forum which already has helped a lot! I'm new here, quite f…
Subscribe to:
Post Comments (Atom)
0 Response to A question on how to bootstrap placebo test 1,000 times
Post a Comment