Hi Statalisters,
Hope you are doing well. I try to estimate the accounting conservatisim following Mozaffar Khan and Ross L. Watts (2009). The main objective is to get the G_Score and C_Score (as showd below).
I'm strugle because there is substituion. Here are the equations, and as you see E (4) the it is at cross sectional annual.
For my variables compared to those in the photo,
Earn = X
Ret= R
D=D
Size=Size
Lev=Lev
M/B=MTB
For more information about what these models, I posted below that part.
I would be gratful if someone help me to do the code for my target.


. dataex Year FirmCode Earn D Size Lev Ret MTB
----------------------- copy starting from the next line -----------------------
Hope you are doing well. I try to estimate the accounting conservatisim following Mozaffar Khan and Ross L. Watts (2009). The main objective is to get the G_Score and C_Score (as showd below).
I'm strugle because there is substituion. Here are the equations, and as you see E (4) the it is at cross sectional annual.
For my variables compared to those in the photo,
Earn = X
Ret= R
D=D
Size=Size
Lev=Lev
M/B=MTB
For more information about what these models, I posted below that part.
I would be gratful if someone help me to do the code for my target.
. dataex Year FirmCode Earn D Size Lev Ret MTB
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int Year str6 FirmCode float(Earn D Size Lev) double Ret float MTB 2008 "13283U" . . 9.202913 .18466653 . -1.942846 2009 "13283U" .1762039 1 9.662053 .13017187 .5555555555555554 -4.696562 2010 "13283U" .03157225 1 9.93871 0 .02380952380952417 -26.25729 2011 "13283U" .09644254 1 10.594156 0 .9069767441860463 7.686573 2012 "13283U" .016966993 1 10.41676 0 -.1585365853658537 5.539622 2013 "13283U" -.017118061 1 10.22644 0 -.1739130434782609 4.798333 2014 "13283U" .028236317 0 11.435266 0 2.333333333333333 14.926278 2015 "13283U" -.01414707 1 10.841325 0 -.4421052631578946 11.393621 2016 "13283U" -.01943667 1 11.023176 0 .1981132075471701 18.248362 2017 "13283U" -.06348118 1 9.990949 .18893164 -.6535433070866141 56.54922 2018 "13283U" -.1754627 1 9.402282 .3854407 -.4545454545454545 -4.083586 2019 "13283U" .04357874 1 9.012256 .5786907 -.3333333333333334 -3.8224604 2020 "13283U" .12263806 0 10.06365 .27072507 1.875 -16.997828 2021 "13283U" .065135896 1 10.863757 .02128311 .9999999999999998 11.00885 2022 "13283U" .01383785 1 10.46718 .02151211 -.3369565217391305 6.376883 2023 "13283U" .03730473 1 10.502187 .01277648 .03278688524590145 5.177098 2024 "13283U" .16548976 1 11.067497 .012551714 .7460317460317458 4.860753 2008 "13396J" . . 9.498298 .592562 . .7679065 2009 "13396J" -.13241358 1 9.795402 .005737842 .2941176470588234 .796866 2008 "13429H" . . 7.922986 0 . .53540254 2009 "13429H" -.1076087 0 8.14642 0 1 .59551334 2010 "13429H" .29440743 1 8.500657 0 0 .6668475 2011 "13429H" -.011183408 1 8.066835 0 0 .7411628 2012 "13429H" .06871666 1 7.860956 0 0 .6439921 2013 "13429H" -.29452583 1 7.893199 0 0 .8361423 2014 "13429H" -.54497945 1 7.349874 . -.5 .9158328 2015 "13429H" -.4312339 1 6.588926 . 0 .6826291 2016 "13429H" -.215956 1 7.142828 . 0 1.1479129 2017 "13429H" -.1612648 1 6.826545 . 0 .8328817 2018 "13429H" -.4121475 1 6.53814 . 0 .9504814 2019 "13429H" -.18813314 1 6.228511 0 0 .8492462 2020 "13429H" -.2504931 1 7.338238 0 0 1.585567 2021 "13429H" -.16384916 1 7.203405 0 0 1.7454545 2022 "13429H" -.3400298 1 7.101676 0 0 2.4475806 2023 "13429H" -.3319605 1 6.850126 0 0 10.150537 2008 "134982" . . 11.844192 .7733014 . 1.1713457 2009 "134982" .11919037 1 12.473876 .3259148 .8688524590163926 2.206059 2010 "134982" .08453894 1 12.368837 .27618206 -.1052631578947368 1.8964705 2011 "134982" .02251946 1 12.42377 .3752383 .07843137254901977 1.9923238 2012 "134982" .036598805 1 12.326364 .414958 -.07272727272727264 2.017576 2013 "134982" .02615654 1 12.21727 .4533948 -.07843137254901988 1.9062394 2014 "134982" -.09443665 1 12.074688 .6842442 -.1063829787234042 2.579059 2015 "134982" -.003991424 1 12.13271 .622535 .05952380952380976 3.266309 2016 "134982" .09147014 1 12.555993 .4076944 .5505617977528088 4.1429343 2017 "134982" .031361107 1 12.739573 .2982597 .22463768115942 5.36129 2018 "134982" .009971318 1 12.40307 .5173518 -.2721893491124259 3.602781 2019 "134982" .03325833 1 11.892998 .9251978 -.3739837398373982 2.2778661 2020 "134982" .04444779 1 11.644532 1.2773306 -.2077922077922079 1.7050225 2021 "134982" .11747584 1 11.973655 .9039698 .491803278688524 2.2711031 2022 "134982" -.15013595 1 10.202555 6.26205 -.8351648351648351 .473193 2023 "134982" -.4263681 1 10.736983 3.652204 .7333333333333334 1.24062 2024 "134982" .7234884 0 12.392598 .5842057 4.346153846153846 3.801435 2008 "135024" . . 16.52511 .492508 . 2.696357 2009 "135024" .02319857 1 16.272676 1.204141 .3972835314091681 1.3242583 2010 "135024" .00678197 1 16.463608 .8257961 -.001215066828675893 1.7945597 2011 "135024" .035977967 1 16.553394 .8357005 .06690997566909895 1.6236086 2012 "135024" .03058169 1 16.6564 .8381609 .01026225769669309 1.6292777 2013 "135024" .018900277 1 17.059298 .5760708 -.07900677200902873 2.9050064 2014 "135024" .014410637 1 16.785791 .5813127 -.1678921568627451 2.55282 2015 "135024" .020120375 1 16.844893 .4989432 -.03681885125184081 2.584228 2016 "135024" .022747913 1 16.61027 .7898917 .1024464831804284 1.9205554 2017 "135024" .04355293 1 16.78829 .8509045 .1595006934812757 1.7680168 2018 "135024" .04043629 1 16.611666 .9941254 -.06578947368421018 1.4695786 2019 "135024" .05880535 1 16.807398 .8332065 .03457106274007615 1.5720044 2020 "135024" .0517559 1 16.512102 1.1381688 .07673267326732636 1.2306675 2021 "135024" .0648186 1 16.724014 .9765365 -.1218390804597701 1.3966806 2022 "135024" .05459996 1 16.557426 1.1383177 -.04581151832460739 1.200871 2023 "135024" .067137405 1 16.370825 1.4052522 -.02880658436214001 .9470638 2024 "135024" .07278907 1 16.791975 .8900561 -.1398305084745762 1.4683765 2008 "135073" . . 17.791622 .7017933 . 4.212411 2009 "135073" .14103012 1 18.270048 .6208351 -.08086469175340272 4.093386 2010 "135073" .1050133 1 18.034416 .7833796 -.03571428571428548 3.128237 2011 "135073" .06868732 1 17.76298 1.0702621 -.02529358626919631 2.771397 2012 "135073" .06333585 1 17.461737 1.3872005 -.02873030583873937 2.2426755 2013 "135073" .09719302 1 17.586077 1.153284 .02576335877862546 2.525998 2014 "135073" .05394007 1 17.620302 1.1093738 -.06697674418604649 2.556733 2015 "135073" .04742773 1 17.463367 1.206898 -.05084745762711851 2.765159 2016 "135073" .04056506 1 17.275969 1.3928248 .1586134453781511 2.3785744 2017 "135073" .07658698 1 17.386576 1.333802 .03989120580235728 2.4617236 2018 "135073" .07312521 1 17.323984 1.3991197 .01133391455972066 2.0964155 2019 "135073" .02311246 1 17.168411 1.786714 -.05603448275862088 1.8605218 2020 "135073" .03945431 1 16.51859 2.896988 .05570776255707743 1.5678238 2021 "135073" .4728082 1 16.783117 2.56493 -.06141868512110715 1.482171 2022 "135073" .0778151 1 16.598867 2.748496 .05622119815668181 1.0982276 2023 "135073" -.06286866 1 16.688084 2.592389 -.02268760907504364 1.393476 2024 "135073" -.01558399 1 16.77316 2.366185 -.04642857142857126 1.883328 2008 "135084" . . 12.50153 .8352509 . .7361877 2009 "135084" -.6234688 1 9.634038 15.914965 -.9287958115183246 .082738 2010 "135084" -3.573121 0 11.83459 1.2187513 2.044117647058822 .6170439 2011 "135084" -1.3147917 1 10.2823 .8448187 -.78743961352657 .6628168 2012 "135084" -3.462018 1 10.42558 .4721011 -.75 1.0883645 2008 "135085" . . 9.588845 .3257996 . 1.4850488 2009 "135085" .07787138 1 9.515248 .26236638 -.06862745098039214 1.3064625 2010 "135085" .10976779 1 9.556551 .2065502 .04210526315789509 1.2231355 2011 "135085" .12124213 1 9.826984 .11691046 .303030303030303 1.4357563 2012 "135085" .09197388 1 9.783408 .07509726 -.04651162790697694 1.2749425 2013 "135085" .04296104 1 9.623178 .05631659 -.1463414634146341 1.0736057 2014 "135085" .06478724 1 9.616205 .04691457 -.009523809523809157 1.0008004 2015 "135085" .09149674 1 9.865941 .032341797 .2884615384615385 1.1689423 2008 "135109" . . 9.589461 1.0841889 . .5242572 end format %ty Year
Comment