A (probably silly) question about the bootstrap command.
When trying to bootstrap a coefficient, one can save the estimated coefficient for each resampling/bootstrap iteration, and pile them up in a dataset.
When summarizing the aforementioned coefficient , I get an average that is different from the bootstrap results (while the sd are exactly identical.)
Below is an example that hopefully will illustrate/clarify:
Code:
cap program drop Test program define Test, rclass preserve reg price mpg weight length clear return scalar coeff = _b[mpg]/_b[weight] end sysuse auto, clear bootstrap r(coeff), reps(50) seed(123) saving(bla, replace): Test use bla, clear su _bs_1
Thanks a lot,
Alex.
0 Response to Question bootstrap - saved dataset yield different values compared to bootstrap
Post a Comment