Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Estimating discretionary accruals using the modified Jones (1991)

    Hello -

    I am venturing into my first archival study and am struggling with figuring out the Stata code to estimate total accruals and discretionary accruals. Could someone please help me?

    I have tried the following code from a blogger but it is not working for me.
    gen sic_2= substr(sic,1,2)
    destring sic_2, replace

    vallist sic_2
    local a =r(list)

    vallist fyear
    local b =r(list)

    gen uhat=.
    xtset gvkey fyear
    gen obs= [_n]
    summ obs
    scalar e= r(min)
    scalar f= r(max)

    gen ta= (ib-oancf)/L.at
    gen x1= 1/L.at
    gen x2= (d.revt – d.rect)/L.at
    gen x3= ppegt/L.at

    foreach i in `a’ {
    foreach x in `b’ {
    forvalues j= `=scalar(e)’/`=scalar(f)’ {
    capture noisily reg ta x1 x2 x3 if sic_2==`i’ & fyear==`x’ & obs != `j’, nocons
    capture noisily predict uhat_2, resid
    capture noisily replace uhat_2=. if e(N) < 10
    capture noisily replace uhat= uhat_2 if sic_2==`i' & fyear==`x' & obs== `j'
    capture noisily drop uhat_2
    di `i'
    di `x'
    di `j'
    }
    }
    }



    Thank you very much.

  • #2
    "not working for me" is, unfortunately, completely uninformative.

    "from a blogger" means you have a source; why not give it to increase your chance of any kind of positive answer?

    "modified Jones (1991)" will mean something to a small number of people, but please see the FAQ on expectations here on references.

    In fact, do please read the FAQ as requested of you. It really is intended to help you ask questions that will be answered.

    Comment


    • #3
      I do second all Nick's recommendations here.
      If Ally refers to: Jennifer J. Jones. Earnings Management During Import Relief Investigations. Journal of Accounting Research, Vol. 29, No. 2 (Autumn, 1991), pp. 193 228. http://www.jstor.org/stable/2491047, why not reporting full reference from the start of the thread?
      Kind regards,
      Carlo
      (Stata 18.0 SE)

      Comment

      Working...
      X