Compute bootstrap estimates
. bootstrap: regress mpg weight gear foreign
Same as above command
. bootstrap _b: regress mpg weight gear foreign
Change number of replications to 100
. bootstrap, reps(100): regress mpg weight gear foreign
Compute acceleration to obtain BCa confidence intervals
. bootstrap, bca: regress mpg weight gear foreign
Save results to bsauto file
. bootstrap, saving(bsauto): regress mpg weight gear foreign
Run bootstrap on difference in coefficients of weight and gear
. bootstrap diff=(_b[weight]-_b[gear]): regress mpg weight gear foreign
bootstrap t statistic using 1000 replications, stratifying on foreign, and saving results in bsauto file
. bootstrap t=r(t), rep(1000) strata(foreign) saving(bsauto, replace): ttest mpg, by(foreign) unequal
|