I know it may be a really elementary problem, but... I have a dataset with 1464 variables and I am trying to do time-series regression in all of them and exporting the results with the -postfile- command. However, no results are being posted in the new dataset. I am new to the use of the -postfile- command along with -foreach-. I have not been able to find an answer in the other posts of Statalist. Can someone provide me with any advice?
*================================
tempname memhold
postfile `memhold' `var'_beta `var'_se `var'_p using "testabcdef.dta" , replace
foreach var of local varlist {
prais `var' year, rhotype(regress)
local b = _b[`var']
local se = _se[`var']
test `var'
local p=r(p)
post `memhold' (`b') (`se') (`p')
}
postclose `memhold'
*===============================
Thank you all,
*================================
tempname memhold
postfile `memhold' `var'_beta `var'_se `var'_p using "testabcdef.dta" , replace
foreach var of local varlist {
prais `var' year, rhotype(regress)
local b = _b[`var']
local se = _se[`var']
test `var'
local p=r(p)
post `memhold' (`b') (`se') (`p')
}
postclose `memhold'
*===============================
Thank you all,
Comment