Hi guys,
I'm using Stata 13.1 and lets use the example datasheet "auto" for my two questions. I have not done bootstrapping before, but read the bootstrapping chapter in "Microeconometrics using Stata".
1) What is the difference between:
regress mpg weight gear foreign, vce(bootstrap, reps(100) seed(1))
bootstrap, reps(100) seed(1): regress mpg weight gear foreign
It gives me the same result (which is not surprising, please see attached) - but is "methodology" behind the code the same? Thats my only concern.

2) Isnt it possible to save the "bootstrapped" dataset of, for example, 2.000 reps, i.e. the simulated data?
I would really like this, because I find it easier to do hypothesis testing, etc. if I have the "new" dataset.
3) Same as Q2, just with the residuals bootstrap approach:
With help from the Microeconometrics book, mentioned above, I use the following code:
use auto, clear
quietly regress mpg trunk price
predict uhat, resid
keep uhat
save residuals, replace
program bootresidual
version 11
drop _all
use residuals
bsample
merge using auto.dta
regress mpg trunk price
predict xb
generate ystar=xb+uhat
regress ystar trunk price
end
**
simulate _b, seed(1) reps (400) nodots: bootresidual
sum
But as for Q2, I would really like a "new" bootstrapped dataset - is it possible? And when would you prefer 1) > 2)
I'm using Stata 13.1 and lets use the example datasheet "auto" for my two questions. I have not done bootstrapping before, but read the bootstrapping chapter in "Microeconometrics using Stata".
1) What is the difference between:
regress mpg weight gear foreign, vce(bootstrap, reps(100) seed(1))
bootstrap, reps(100) seed(1): regress mpg weight gear foreign
It gives me the same result (which is not surprising, please see attached) - but is "methodology" behind the code the same? Thats my only concern.
2) Isnt it possible to save the "bootstrapped" dataset of, for example, 2.000 reps, i.e. the simulated data?
I would really like this, because I find it easier to do hypothesis testing, etc. if I have the "new" dataset.
3) Same as Q2, just with the residuals bootstrap approach:
With help from the Microeconometrics book, mentioned above, I use the following code:
use auto, clear
quietly regress mpg trunk price
predict uhat, resid
keep uhat
save residuals, replace
program bootresidual
version 11
drop _all
use residuals
bsample
merge using auto.dta
regress mpg trunk price
predict xb
generate ystar=xb+uhat
regress ystar trunk price
end
**
simulate _b, seed(1) reps (400) nodots: bootresidual
sum
But as for Q2, I would really like a "new" bootstrapped dataset - is it possible? And when would you prefer 1) > 2)
Comment