Alan <[email protected]>:
It might help if you clarified where you are storing the results, for
what purpose--I assumed you were doing some low-level parsing of
results given that you are rolling your own with -bsample-. Might the
below code help?
cap prog drop putebin
prog putebin
syntax anything
conf matrix `anything'
loc vlist: colnames `anything'
tempname b new
mat `b'=e(b)
foreach c of local vlist {
cap mat `new'=nullmat(`new'),`b'[1,"`c'"]
if _rc mat `new'=nullmat(`new'),.
}
mat `anything'=`new'
mat colname `anything'=`vlist'
end
sysuse auto, clear
gen m2=mpg
replace m2=uniform() in 2/5
qui xtreg price mpg m2, i(rep78)
mat b=e(b)
mat li b
set seed 1
bsample
qui xtreg price mpg m2, i(rep78)
mat li e(b)
putebin b
mat li b
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/