Announcement

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

  • Advice on running regression for Accruals Earnings Management


    Code:
    TAit/Ai,t-1 = β0 (1/Ai,t-1) + β1 ((ΔS)/Ai,t-1) + β2 (PPEit/Ai,t-1)+ ԑit
    I quite new to statistical software. I am working on my thesis to find accruals earning management I need to run the above equation for each firm by industry and year. The steps and questions I am considering: 1. Since my data is panel data, do xset my data using Ticker Year 2. Should I calculate the variables in advance first. before running the reg equation ? for example should I beforehand need to create a variable for example
    Code:
    TAit/Ai,t-1
    3. Run regression using " reg TAit/Ai,t-1 ....... I need to use the use the value of B1, B2 and B3 for my second regression equation. Is there is any code I need to include to account for this ? Second Equation:
    Code:
    NAi,t = ^β1(1/Ai,t-1) + ^β2 (ΔSi,t -ΔARi,t)/Ai,t-1) + ^β3 (PPEit/Ai,t-1)
    ^ beta hat run
    Code:
    reg y x1 x2 x3, nocon
    Third Equation:
    Code:
    DAi,t = (TAit/Ai,t-1)/ NA​i,t​​​​​​
    Below is my data sample Thanking you in advance for your input * Example generated by -dataex-. For more info, type help dataex
    clear
    input str9 Ticker str7 Sector str23 Industry str3 Board int Year long(WC01651 WC04860) float(LagAssets ChangeInSales ChangeReceivables) long WC02301 float TA
    "TH:2S" "STEEL" "Industrials" "SET" 1994 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 1995 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 1996 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 1997 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 1998 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 1999 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 2000 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 2001 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 2002 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 2003 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 2004 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 2005 . . . . . . .
    "TH:2S" "STEEL" "Industrials" "SET" 2006 34020 -17390 . . . 179050 51410
    "TH:2S" "STEEL" "Industrials" "SET" 2007 55390 -260 626450 571220 28880 331370 55650
    "TH:2S" "STEEL" "Industrials" "SET" 2008 112840 361700 739620 -172670 -132590 361490 -248860
    "TH:2S" "STEEL" "Industrials" "SET" 2009 91864 -202289 559340 -235159 69236 395128 294153
    "TH:2S" "STEEL" "Industrials" "SET" 2010 71431 -26964 913418 252536 -3135 409757 98395
    "TH:2S" "STEEL" "Industrials" "SET" 2011 64980 91636 1024697 882014 82286 444190 -26656
    "TH:2S" "STEEL" "Industrials" "SET" 2012 52643 -61615 1059772 364111 -470 510104 114258
    "TH:2S" "STEEL" "Industrials" "SET" 2013 68031 148004 1253012 33404 12820 551650 -79973
    "TH:2S" "STEEL" "Industrials" "SET" 2014 41898 108184 1219920 143357 -17705 632275 -66286
    "TH:7UP" "ENERG" "Resources" "SET" 1994 . . . . . . .
    "TH:7UP" "ENERG" "Resources" "SET" 1995 . . . . . . .
    "TH:7UP" "ENERG" "Resources" "SET" 1996 . . . . . . .
    "TH:7UP" "ENERG" "Resources" "SET" 1997 . . . . . . .
    "TH:7UP" "ENERG" "Resources" "SET" 1998 . . . . . . .
    "TH:7UP" "ENERG" "Resources" "SET" 1999 . . . . . . .
    "TH:7UP" "ENERG" "Resources" "SET" 2000 . . . . . . .
    "TH:7UP" "ENERG" "Resources" "SET" 2001 84000 137396 . . . 385317 -53396
    "TH:7UP" "ENERG" "Resources" "SET" 2002 301429 -368824 1239837 516562 -55806 422035 670253
    "TH:7UP" "ENERG" "Resources" "SET" 2003 -123386 -170268 1445609 -668818 -39021 444089 46882
    "TH:7UP" "ENERG" "Resources" "SET" 2004 178368 180634 1589719 919817 233355 1170788 -2266
    "TH:7UP" "ENERG" "Resources" "SET" 2005 179860 -477969 2561613 4771508 63040 1868867 657829
    "TH:7UP" "ENERG" "Resources" "SET" 2006 67330 354412 3659381 2841869 21737 2269883 -287082
    "TH:7UP" "ENERG" "Resources" "SET" 2007 146175 551275 4047774 -2839798 -107338 2561405 -405100
    "TH:7UP" "ENERG" "Resources" "SET" 2008 125678 158321 3776231 -2014388 -24807 2961212 -32643
    "TH:7UP" "ENERG" "Resources" "SET" 2009 126637 308781 4178294 -2531712 -87615 3360213 -182144
    "TH:7UP" "ENERG" "Resources" "SET" 2010 66485 201337 4126859 479308 -119606 3584112 -134852
    "TH:7UP" "ENERG" "Resources" "SET" 2011 -625090 166489 4403855 -357337 -37866 3542542 -791579
    "TH:7UP" "ENERG" "Resources" "SET" 2012 962232 -128523 4072216 -863105 462476 410310 1090755
    "TH:7UP" "ENERG" "Resources" "SET" 2013 58762 46188 1211540 -383169 -434653 412256 12574
    "TH:7UP" "ENERG" "Resources" "SET" 2014 -214396 97692 1229760 -2144318 88283 384919 -312088
    "TH:A" "PROP" "Property & Construction" "SET" 1994 . . . . . . .
    "TH:A" "PROP" "Property & Construction" "SET" 1995 . . . . . . .
    "TH:A" "PROP" "Property & Construction" "SET" 1996 . . . . . . .
    "TH:A" "PROP" "Property & Construction" "SET" 1997 . . . . . . .
    "TH:A" "PROP" "Property & Construction" "SET" 1998 . . . . . . .
    "TH:A" "PROP" "Property & Construction" "SET" 1999 . . . . . . .
    "TH:A" "PROP" "Property & Construction" "SET" 2000 . . . . . . .
    "TH:A" "PROP" "Property & Construction" "SET" 2001 . . . . . . .
    "TH:A" "PROP" "Property & Construction" "SET" 2002 . . . . . . .
    "TH:A" "PROP" "Property & Construction" "SET" 2003 51542 -594372 . . . 140447 645914
    "TH:A" "PROP" "Property & Construction" "SET" 2004 179015 -1578393 2060645 762735 14264 1061154 1757408
    "TH:A" "PROP" "Property & Construction" "SET" 2005 8721 -322179 4016429 -809923 -31812 1092831 330900
    "TH:A" "PROP" "Property & Construction" "SET" 2006 8191 70257 4277750 -97783 -17095 134391 -62066
    "TH:A" "PROP" "Property & Construction" "SET" 2007 -78636 -459811 4294780 -67069 -4824 146235 381175
    "TH:A" "PROP" "Property & Construction" "SET" 2008 32582 -192720 5084116 3939 11741 220299 225302
    "TH:A" "PROP" "Property & Construction" "SET" 2009 518008 1032357 5719965 2632425 21475 255151 -514349
    "TH:A" "PROP" "Property & Construction" "SET" 2010 427951 -73901 5344282 -101860 -24365 290103 501852
    "TH:A" "PROP" "Property & Construction" "SET" 2011 76002 -204507 5512695 -1787209 2722 320140 280509
    "TH:A" "PROP" "Property & Construction" "SET" 2012 94353 -668051 5730727 231452 -115 394755 762404
    "TH:A" "PROP" "Property & Construction" "SET" 2013 13777 -1828784 6866070 -15675 25418 543052 1842561
    "TH:A" "PROP" "Property & Construction" "SET" 2014 41266 -2147707 8974248 675358 -9742 786954 2188973
    "TH:A5" "" "Services" "MAI" 1994 . . . . . . .
    "TH:A5" "" "Services" "MAI" 1995 . . . . . . .
    "TH:A5" "" "Services" "MAI" 1996 . . . . . . .
    "TH:A5" "" "Services" "MAI" 1997 . . . . . . .
    "TH:A5" "" "Services" "MAI" 1998 . . . . . . .
    "TH:A5" "" "Services" "MAI" 1999 . . . . . . .
    "TH:A5" "" "Services" "MAI" 2000 . . . . . . .
    "TH:A5" "" "Services" "MAI" 2001 . . . . . . .
    "TH:A5" "" "Services" "MAI" 2002 23850 10679 . . . 10176 13171
    "TH:A5" "" "Services" "MAI" 2003 29739 -6357 107821 178442 30550 26545 36096
    "TH:A5" "" "Services" "MAI" 2004 37936 -49421 243856 81778 49464 39950 87357
    "TH:A5" "" "Services" "MAI" 2005 -53245 7002 250859 -41920 -35311 60789 -60247
    "TH:A5" "" "Services" "MAI" 2006 -140825 -43042 212381 -102005 -67666 36932 -97783
    "TH:A5" "" "Services" "MAI" 2007 -47732 -9162 132642 95976 -5283 273544 -38570
    "TH:A5" "" "Services" "MAI" 2008 -72508 35726 326010 6363 10776 327709 -108234
    "TH:A5" "" "Services" "MAI" 2009 -50292 -90665 415843 41288 -29654 30356 40373
    "TH:A5" "" "Services" "MAI" 2010 -59916 -55210 179217 -155172 14933 43486 -4706
    "TH:A5" "" "Services" "MAI" 2011 -9658 16887 122448 256964 -16650 45304 -26545
    "TH:A5" "" "Services" "MAI" 2012 -50444 -29348 111537 -205830 15695 41145 -21096
    "TH:A5" "" "Services" "MAI" 2013 -14595 -24670 92799 -115390 -4471 33101 10075
    "TH:A5" "" "Services" "MAI" 2014 -69825 -76829 56128 -28326 81955 61425 7004
    "TH:AA" "PAPER" "Industrials" "SET" 1994 -334257 -366342 1828298 327071 3708487 . 32085
    "TH:AA" "PAPER" "Industrials" "SET" 1995 -95536 -1260273 7089493 355369 -2613853 12081574 1164737
    "TH:AA" "PAPER" "Industrials" "SET" 1996 -912982 -1180609 15036385 1863555 -281003 16598112 267627
    "TH:AA" "PAPER" "Industrials" "SET" 1997 -7011903 917613 19720408 3936430 800238 35388859 -7929516
    "TH:AA" "PAPER" "Industrials" "SET" 1998 4768554 -1560956 41224668 2849737 1080166 36468319 6329510
    "TH:AA" "PAPER" "Industrials" "SET" 1999 -3734238 503607 41767512 3482412 -527496 31489612 -4237845
    "TH:AA" "PAPER" "Industrials" "SET" 2000 628910 2960467 31661680 1953112 -301470 29847107 -2331557
    "TH:AA" "PAPER" "Industrials" "SET" 2001 199010 2602473 32022228 679058 306276 30031605 -2403463
    "TH:AA" "PAPER" "Industrials" "SET" 2002 1195095 1606824 30030758 -874908 -1255118 30527120 -411729
    "TH:AA" "PAPER" "Industrials" "SET" 2003 1495941 1206283 28927114 2963067 1255874 31096476 289658
    "TH:AA" "PAPER" "Industrials" "SET" 2004 1518619 3457547 29620652 3051721 -171806 31225555 -1938928
    "TH:AA" "PAPER" "Industrials" "SET" 2005 1909528 2002106 27602408 -1050764 -164589 33727028 -92578
    "TH:AA" "PAPER" "Industrials" "SET" 2006 1972180 1027353 29712028 2297918 453962 34061073 944827
    "TH:AA" "PAPER" "Industrials" "SET" 2007 430287 2109410 30104416 1388124 265677 34570275 -1679123
    "TH:AA" "PAPER" "Industrials" "SET" 2008 . . 28563384 . . . .
    "TH:AA" "PAPER" "Industrials" "SET" 2009 . . . . . . .
    end
    [/CODE]

  • #2
    To answer your first question: yes, when using panel data, your data should be xtset.

    Two: yes, calculate your variables correctly before using them in regression.

    I don't follow your third question.

    Comment


    • #3
      Jared Greathouse Thank you for your suggestions !

      Just to clarify my third questions, I would use the predicted coefficient estimates from equation (1) to estimate firm specific normal accruals (NAi,t) for the sample firms using the equation below:

      Code:
      NAi,t = ^β1(1/Ai,t-1) + ^β2 (ΔSi,t -ΔARi,t)/Ai,t-1) + ^β3 (PPEit/Ai,t-1)
      So to take the residuals from the first equation what commands should I look into.

      Thank you for your suggestions once again.

      Comment

      Working...
      X