Hi all,
I'm running a regressiong to test the independent variable "DOL" against a changing dependent variable y1,y3,....,y60.
I would like to extract and save beta coefficient, std error and the P-value from my regressions and so far have the code:
I managed to extract the constants, betas and standard errors, but have no idea how to extract the t-value, P-value and CI.
Thank you.
I'm running a regressiong to test the independent variable "DOL" against a changing dependent variable y1,y3,....,y60.
I would like to extract and save beta coefficient, std error and the P-value from my regressions and so far have the code:
clear
import excel "D:\Test Loop.xlsx", sheet("Raw Data") firstrow
tempname myresults
postfile `myresults' y constant b1 se using myresults.dta
foreach y of varlist y1-y60 {
quietly xi: reg `y' DOL
post `myresults' (`y') (`=_b[_cons]') (`=_b[DOL]') (`=_se[DOL]')
}
postclose `myresults'
import excel "D:\Test Loop.xlsx", sheet("Raw Data") firstrow
tempname myresults
postfile `myresults' y constant b1 se using myresults.dta
foreach y of varlist y1-y60 {
quietly xi: reg `y' DOL
post `myresults' (`y') (`=_b[_cons]') (`=_b[DOL]') (`=_se[DOL]')
}
postclose `myresults'
Thank you.

Comment