Hi,
I would like to predict the residuals for each regression separately. So instead of doing like this for every y1:
Code:
reg compensation ///
FirmSize ///
ROLMEAN3_BMV ///
LTDTA ///
i.year ///
i.sector, vce(cluster firm_ID)

predict Res_compensation, residuals
label var Res_compensation "ResidualComp"
I would like to do it like this:

Code:
macro drop _all

local x1 FirmSize ///
ROLMEAN3_BMV ///
LTDTA ///
i.year ///
i.sector, vce(cluster firm_ID)

local y1 compensation1 ///
comepnsation2 ///
compensation3

foreach y in `y1' {
quietly reg `y' `x2'
predict Exc_`y1', residuals
}