sysuse auto
mat res = J(5,2,0)
local i 0
foreach v of varlist headroom-turn {
qui reg price `v'
local ++i
mat res[`i',1] = _b[`v']
mat res[`i',2] = 2*ttail(e(df_r),_b[`v']/_se[`v'])
local rl "`rl' `v'"
}
mat rownames res = `rl'
mat colnames res = Coeff p-value
mat list res, f(%9.3f)
Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/