I am trying to get the values of my regressand variable TA_SCALED_LASSETS post regression. I looked over online seems like it should be "regsave" but just looking for more clarification.
Thanking you in advance for your help.
Code:
set more off
gen DACC = .
gen TA = .
egen sicid = group(SICCode Year)
sum sicid
local max=r(max)
forvalues i = 1/`max' {
di "Busy with regression " `i' " of " `max'
qui reg TA_SCALED_LASSETS INVER_LAG_ASSET DSALES_S_LAGASSETS PPE_S_LAGASSETS if sicid == `i', nocons
qui predict res if sicid == `i', res
qui replace DACC = res if sicid == `i'
qui drop res
}

Comment