Hello Statalist members
I'm trying to compute the following model

where:
TA = Total Accruals
delta Rev = Sales - Sales_n-1
delta AR = Receivables - Receivables_n-1
PPE = Property, plant and equipment
Assets are all lagged 1 year
I got this code below from the topic http://www.statalist.org/forums/foru...ied-jones-1991.
I'm running it to the 1 SIC code instead of 2 SIC code, since 2 SIC code would take a lot of time (since this one already takes a lot of time).
So, before I ran it:
I adjusted all the variables accordingly to CPI index of 2014.
I winsorized all variables at 1%.
Then I run the code below, where the final variable (-disc_accruals-) give me what I want (discretionary accruals), but I think that the values that I obtain are not what are supposed.
Should I adjust the variables and winsorize only in the final variable (-disc_accruals-) or that will not influence it?
After asking a colleague for my problem, he gaves me the code below:
What can I say is that, if I was getting strange values with the code above, with this one I got even more strange values. I see that the code above don't compute if has less than 10 estimable observations for this group (10 One-Digit-SIC per year). The code below don't has any specification to it, so I think that It doesn't do what is supposed (something is missing).
Sorry for the long text, I tried to be the most clear as possible, if its need more information about something please be free to ask for it, I would really appreciate any help since I am completely lost doing it (master thesis in finance)
Best regards
I'm trying to compute the following model
where:
TA = Total Accruals
delta Rev = Sales - Sales_n-1
delta AR = Receivables - Receivables_n-1
PPE = Property, plant and equipment
Assets are all lagged 1 year
I got this code below from the topic http://www.statalist.org/forums/foru...ied-jones-1991.
I'm running it to the 1 SIC code instead of 2 SIC code, since 2 SIC code would take a lot of time (since this one already takes a lot of time).
So, before I ran it:
I adjusted all the variables accordingly to CPI index of 2014.
I winsorized all variables at 1%.
Then I run the code below, where the final variable (-disc_accruals-) give me what I want (discretionary accruals), but I think that the values that I obtain are not what are supposed.
Should I adjust the variables and winsorize only in the final variable (-disc_accruals-) or that will not influence it?
Code:
clear use Wn2014WSvarsLAGGED sort sedol year by sedol: gen delta_rev = Net_Sales - Net_Sales_1 by sedol: gen delta_ar = Net_Receivables - Net_Receivables_1 gen SIC1 = real(substr(sic,1,1)) encode sedol , generate(numsedol) xtset numsedol year gen disc_accruals= . gen TAccruals = (NIncome_Before_Extra_Items - Net_CashFlow_Oper_Acti)/Total_Assets_1 gen x1 = 1/Total_Assets_1 gen x2 = (delta_rev - delta_ar)/Total_Assets_1 gen x3 = ppegross/Total_Assets_1 forvalues j = 1/`=_N' { capture noisily { reg TAccruals x1 x2 x3 if SIC1 == SIC1[`j'] & year == year[`j'] & _n != `j' if e(N) >= 10 { replace disc_accruals= TAccruals - (_b[x1] * x1 + _b[x2] * x2 + _b[x3] * x3) in `j' } } }
What can I say is that, if I was getting strange values with the code above, with this one I got even more strange values. I see that the code above don't compute if has less than 10 estimable observations for this group (10 One-Digit-SIC per year). The code below don't has any specification to it, so I think that It doesn't do what is supposed (something is missing).
Code:
use Wn2014WSvarsLAGGED sort sedol year by sedol: gen delta_rev = Net_Sales - Net_Sales_1 by sedol: gen delta_ar = Net_Receivables - Net_Receivables_1 by sedol: gen TAccruals = (NIncome_Before_Extra_Items - Net_CashFlow_Oper_Acti)/Total_Assets_1 by sedol: gen C = (delta_rev - delta_rec)/Total_Assets_1 by sedol: gen D = ppegross/Total_Assets_1 sort sedol year *Regression by sedol: reg TAccruals C D *the yhat correspond to the total accruals estimated by the regression predict yhat, xb *the discretionary accruals is the difference between the total accruals reported by the enterprise and the total accruals estimated by the regression gen disc_accruals = TAccruals - yhat
Sorry for the long text, I tried to be the most clear as possible, if its need more information about something please be free to ask for it, I would really appreciate any help since I am completely lost doing it (master thesis in finance)

Best regards
Comment