Hello,
I can use the following codes in Stata to generate regression according to original Jones model.
gen Jones1991_DA=.
forval y = 2010(1) 2015{
forval i = 1(1) 6{
display `i'
display `y'
regress TACC term1 term2 term3 if `i'==industry_code & `y'==year, noconstant
predict r = if `i' == industry_code & `y' ==year, resid
replace Jones1991_DA=r if `1'== industry_code & `y' == year
drop r
}
}
Remarks:
TACC=total accruals
term1=1/lagged total assets
term2=change in revenues
term3=gross PPE
Using these codes, I can generate regression for original Jones model 1991 and save the residuals. However, what I want to do is to save the betas and then put them in modified Jones model to estimate the residual (discretionary accruals). I found that I need to do it one by one using each industry and year, which is very time-consuming.
Therefore, I would like to ask how I can save the betas generated from the original Jones model and put the betas (generated from original Jones) in modified Jones model so that I can estimate the residuals (discretionary accruals) in the modified Jones model.
Thank you very much.
Steven