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
need help using DM (dynamic multiplier) for exogenous variables in PVAR's impulse responseHello, I am working with pvar model, where I would like to see the response of (gdp cpi credit) to i…
TableHi, How can I make a table which includes the percent of cases for each category? (I'm working with…
How do I use STATA to do simulations for a Bernoulli trial?Suppose I have a Bernoulli trial that has a success rate of 0.05, and I run it for 30 times. Then I …
Question about calculating rates of conversion using panel dataI have a question about efficiently calculating rates using panel data. Specifically, I have a datas…
TAbleHi, How can I make a table which includes the percent of cases for each category? (I'm working with…
Subscribe to:
Post Comments (Atom)
0 Response to A question on how to bootstrap placebo test 1,000 times
Post a Comment