Dear Statalisters,
I would like to write an eclass program which is to be passed to the bootstrap command. In this program I would like to estimate a model followed by some tests which results I would like to store in addition to the coefficient vector. To give an example:
If I type ereturn list I cannot find the scalar. Could somebody please tell me what went wrong here?
I would like to write an eclass program which is to be passed to the bootstrap command. In this program I would like to estimate a model followed by some tests which results I would like to store in addition to the coefficient vector. To give an example:
Code:
sysuse auto, clear replace price = . in 10 //to check whether correct number of obs is used in bootstrap capture program drop myboot program myboot, eclass tempname b newscal regress price mpg headroom i.rep78 matrix `b' = e(b) lincom mpg-headroom ereturn scalar `newscal' = r(se) ereturn post `b' end bootstrap, rep(1000) seed(342): myboot
Comment