I have questions regarding the way that the command -simulation- runs the pre-defined the program. I use the Example 2 in the Stata documentation of -simulate- which can be found here https://www.stata.com/manuals13/rsimulate.pdf. In this example, Monte-Carlo simulations are implemented to get 10000 observations of estimated parameters and corresponding standard error.
Code:
drop _all set obs 100 set seed 54321 gen x = rnormal() gen true_y = 1+2*x save truth file truth.dta saved program hetero2 version 13 args c capture drop y gen y = true_y + (rnormal() + ‘c’*x) regress y x end simulate _b _se, reps(10000): hetero2 3
Kind regards,
Yugen
0 Response to where does -simulate- save the returned results each time?
Post a Comment