Announcement

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

  • T-stats for the differences between the groups

    Hi all,
    I am examing the impact of CO1 on CASH based on two groups: rating=1 and rating=0. How can I show the T-stats for the differences between the groups?


    reg CASH CO1 SIZE MTB LEV if rating==1, vce(cluster gvkey)
    reg CASH CO1 SIZE MTB LEV if rating==0, vce(cluster gvkey)

    The data is as follows:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(CASH CO1 SIZE MTB LEV rating)
    .12091687 .125 4.893749 2.737383 .13108735 0
    .06831112 .14285715 7.591894 1.374273 .31395 0
    .036111083 .5714286 7.139219 1.6956043 .2335058 0
    .05134182 .375 6.564065 2.416742 .034848813 0
    .04732775 1 6.431653 2.1196942 .16162266 0
    .0511916 .875 6.509946 5.417324 0 0
    .018361308 0 5.831994 1.9431428 .32942665 0
    .1536278 1 6.289034 1.9800346 .0022334317 0
    .0006082928 .875 7.409697 1.364763 .23306143 0
    .18827324 1 7.283099 2.963138 0 0
    .1446771 .4285714 7.230247 3.282454 .13310792 0
    .015834587 .125 5.461431 .9400551 .4366914 0
    .09477506 .4166667 6.945963 1.1715845 .1782237 0
    .06554912 .6666667 6.125753 1.8408785 .633895 0
    .1173084 .1818182 6.635298 3.5334814 .11935822 0
    .069483794 .44444445 6.246172 1.4312885 .031598695 0
    .10616461 .44444445 6.701324 2.5673046 .10921077 0
    .06542119 .44444445 8.257933 1.7399578 0 0
    .04846779 1 8.810758 4.945684 .15314643 0
    .5931721 1 5.524975 5.331542 .19929847 0
    .10344365 .3 7.229746 3.220316 .14494099 0
    .06347818 .1 7.416519 1.849982 .28008223 0
    .182537 .2857143 3.5901084 2.976139 .07126529 0
    .155177 .5714286 4.880291 1.3441194 .0010252983 0
    .2998602 .7777778 5.090241 2.5914154 .21044888 0
    .04597449 1 7.850726 3.04046 0 0
    .10497367 .375 6.488877 1.4377306 0 0
    .3128743 .5714286 5.930636 .9413062 0 0
    .07784957 0 5.54739 1.7513213 .27408823 0
    .28281048 1 6.028327 1.956732 .01115609 0
    .10578655 .3333333 7.327743 3.0992904 .2628221 0
    .25093266 .6363636 10.539932 2.7904634 0 0
    .10991275 .2857143 7.051137 .9987242 .14729199 0
    .07255518 1 5.901105 1.780056 .16563275 0
    .185896 .22222222 5.474726 1.2805007 0 0
    .014424815 1 5.494706 2.92044 .0210189 0
    1.5569454 0 7.443853 5.152266 .29251346 0
    .10232772 .375 6.215913 1.746067 .005067382 0
    .3470056 .4 5.740796 2.077045 0 0
    .3989806 .5 7.08365 5.187786 0 0
    .032789033 .11111111 5.465627 1.283019 .12959345 0
    .03244145 .2857143 6.118965 2.915381 .009245281 0
    .27101597 .4285714 8.387828 2.0679002 0 0
    .27874917 .4285714 7.586048 2.858652 .4116493 0
    .022424307 .22222222 6.979988 1.4679502 .2344291 0
    .05493304 1 7.02475 2.70925 .05888816 0
    .06055946 .8888889 8.31779 3.285131 0 0
    .13442199 .5555556 6.426503 6.431568 0 0
    .26108497 .8333333 6.659666 1.9004854 0 0
    .02980936 0 7.274133 2.2524748 .26870018 0
    .04741439 1 7.750951 1.7162793 .28270435 0
    .47253275 .5 5.680841 3.129558 0 0
    .0450058 .22222222 5.617531 1.650422 3.633602e-06 0
    .15727 .2857143 7.061335 3.2802186 .4356514 0
    .010633436 .3333333 6.01943 2.4468164 .21879497 0
    .04715744 1 6.53694 1.023986 .25356036 0
    .059513 .14285715 7.453548 1.580548 .3295388 0
    .6783629 1 5.764417 6.207991 .013493206 0
    .5735517 .7142857 4.954693 5.016565 0 0
    .17160875 .8 5.813366 1.5912465 0 0
    .10105649 .2857143 6.899882 1.118969 .26012388 0
    .0922118 .5714286 7.09262 1.9743214 .09806526 0
    .31602365 1 6.775414 2.684138 .03938167 0
    .006091299 .5 6.566462 1.493292 .27011886 0
    .018565793 .875 7.164488 1.3516642 .1309662 0
    .03959122 0 8.470424 2.0281072 .10497265 0
    .518585 .25 5.840877 1.9456413 0 0
    .27669203 .125 6.418923 1.48785 .04076029 0
    .07256138 .875 7.037526 2.1787496 .21152993 0
    .3679003 .14285715 6.811409 3.991629 0 0
    .2541207 .3 5.330683 1.4844847 .3388534 0
    .033213902 .8333333 5.36448 1.2495835 .16220516 0
    .2134031 .625 6.380196 1.589231 .13073115 0
    .09370057 .5555556 6.004368 2.0540872 0 0
    .3576783 1 8.556991 1.8298573 0 0
    .3836275 .25 7.766824 3.2640746 .1274006 0
    .010908497 0 6.388481 1.5144162 .2812748 0
    .018044302 .2857143 7.538877 2.476043 .08656622 0
    .4539929 0 5.585307 2.2420118 .04831095 0
    .20862257 .625 6.026945 1.8595295 0 0
    .1591888 .4 7.779676 2.502292 .08024252 0
    .12462124 .22222222 5.562795 2.0956876 0 0
    .119145 .125 6.758038 1.247172 .08093492 0
    .04178241 1 5.961155 2.0476468 .05153869 0
    .0006082928 0 7.477879 2.0988166 .08485625 0
    .25971466 .7142857 5.418746 2.2196326 0 0
    .032127704 .5 5.863282 1.0644327 .13114242 0
    .4779071 .5714286 6.059424 3.292687 0 0
    . .0909091 7.155438 .8907291 .20723873 0
    .08445257 .22222222 7.574622 1.1633238 .09551861 0
    .1816063 1 6.139359 2.0436654 .011508207 0
    .033220585 .5714286 7.872515 2.151788 .09526873 0
    .05884094 .6666667 5.970887 1.1719154 .08385798 0
    1.9298403 .8571429 6.491053 8.934058 .00010163573 0
    .016852485 .125 7.16668 1.5480646 .27635202 0
    1.028686 .8571429 5.146622 2.556668 0 0
    .01931834 .25 6.02414 1.869153 .11240884 0
    .02058213 .1 5.760657 1.26085 .4084338 0
    .343399 .8888889 6.665572 2.2688107 0 0
    .12932108 .25 6.652984 4.459769 .15481994 0
    end
    [/CODE]
    ------------------ copy up to and including the previous line ------------------


  • #2
    your question is not completely clear and your example data have only 1 rating (all are 0) and thus are not useful; but my guess is that you want
    Code:
    regress CASH CO1 i.rating

    Comment


    • #3
      You can add many regressors to Rich's equation and use different vce to suit you.

      If you want a different coefficient between the two groups, assuming rating is 0/1,

      Code:
      regress CASH CO1 rating c.rating#c.CO1  SIZE MTB LEV , cluster(gvkey)
      The coefficient on c.rating#c.C01 measures the difference in effect of CO1 and the t-stat is a direct test of that difference.

      Comment


      • #4
        Dear George Ford thank you so much. I got your point.

        Comment

        Working...
        X