Hello everyone,

I work on a regression and I am not quite sure how to code it properly. Basically my regression looks like this (without dummy variable)
Code:
xtset company modate
xtreg rirf rmrf smb hml cma rmw zfund
Now I want to add my dummy variable ("cdo") which tells me if my company has a cdo = 1 or no cdo = 0.

I am not sure how to add the dummy variable into the regression. My solution would be either
Code:
xtreg rirf rmrf smb hml cma rmw zfund cdo
or
Code:
xtreg rirf rmrf smb hml cma rmw zfund if cdo == 1
I hope one of the regressions is correct.

After applying the regression I have a question regarding intepretating the results. I know this is not a Stata Coding question but maybe someone can help me with the interpretation. Basically I want to interpretate the effect of zfund*cdo on the rirf (The smb hml cam rmw results are irrelevant for this case).
Should I look at the correlation of zfund and cdo to analyse the combined effect of cdo and zfund on rirf ? I hope someone can help me out as I am very confused about the interpretation of the table with a dummy variable.

Thanks to everyone

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(modate zfund mktrf smb hml rmw cma rf) int company byte(cdo bank) float(ret_us count rirf rmrf)
624  -1.0642962  5.05   2.1  -.99 -2.05 -1.41   0 1 1 1    .2823721 97    .2823721 -2.05
625  -1.1153159  4.42 -1.69   .32  -.38  -.06   0 1 1 1    .1192195 97    .1192195  -.38
626   -1.118736  3.11  -.51  1.19  -.57   .81   0 1 1 1   .20075314 97   .20075314  -.57
627  -1.1402786  -.85  -.51   -.8  1.26   .67   0 1 1 1   -.1525615 97   -.1525615  1.26
628  -1.0566843 -6.19  -.03  -.78   2.5  2.41 .01 1 1 1  -.09245268 97  -.10245268  2.49
629    -.968369  3.89   .94   .63 -1.26   .32   0 1 1 1    .1129328 97    .1129328 -1.26
630   -.9747435   .79 -2.68  -.07   .93    .1   0 1 1 1  -.10269023 97  -.10269023   .93
631  -1.1112053  2.55   .43  1.21 -1.42  -.72 .01 1 1 1    .0885586 97    .0785586 -1.43
632  -.57883817  2.73   .65  1.53 -1.32   1.6 .01 1 1 1   .10652078 97   .09652078 -1.33
633  -1.0946654 -1.76  -.82  3.68  -1.5  2.27 .01 1 1 1   .05549365 97   .04549365 -1.51
634   -1.098425   .78   .31  -.94   .39   .92 .01 1 1 1   .05793252 97   .04793252   .38
635  -1.1478089  1.18  1.88  3.52 -1.79   .89 .01 1 1 1   .17860857 97   .16860856  -1.8
636  -1.0501254  5.57   .55   .91 -1.72  1.46   0 1 1 1  -.02497326 97  -.02497326 -1.72
637   -.9873649  1.29  -.36   .07  -.65   .47   0 1 1 1 -.007075083 97 -.007075083  -.65
638   -.9471298  4.03   .85   -.2   .55  1.32   0 1 1 1   .08459456 97   .08459456   .55
639   -.9412989  1.55 -2.29   .55   .13   .48   0 1 1 1  .010677938 97  .010677938   .13
640   -.7633607   2.8  1.99  2.65 -2.01  -.74   0 1 1 1   .10966566 97   .10966566 -2.01
641  .003116382  -1.2  1.35  -.02  -.35  -.02   0 1 1 1  -.05784499 97  -.05784499  -.35
642   -.9454608  5.65  1.81   .58 -1.33   .55   0 1 1 1   .13530035 97   .13530035 -1.33
643   -.7979175 -2.71  -.03 -2.67   .59 -2.18   0 1 1 1 -.032880723 97 -.032880723   .59
644   -.5600812  3.77  2.65 -1.19   -.6 -1.26   0 1 1 1  -.02197802 97  -.02197802   -.6
645   -.8588011  4.18 -1.49   1.2  2.78   .84   0 1 1 1   .01232065 97   .01232065  2.78
646   -.9537788  3.13  1.33   .31   .13   .07   0 1 1 1   .13242933 97   .13242933   .13
647   -.7821412  2.81  -.58  -.05  -.47   .09   0 1 1 1  -.01517821 97  -.01517821  -.47
648   -.8911942 -3.32   .58 -2.02 -3.93 -1.36   0 1 1 1    .0757885 97    .0757885 -3.93
649   -.8099153  4.65   .11  -.37  -.24  -.41   0 1 1 1 -.013131475 97 -.013131475  -.24
650   -.4301951   .43 -1.13  4.91  2.17  1.83   0 1 1 1   .04113565 97   .04113565  2.17
651   .21623185  -.19 -4.13  1.11  3.53  1.02   0 1 1 1  -.11977196 97  -.11977196  3.53
652  -.15925674  2.06 -1.91  -.12   .03 -1.05   0 1 1 1           0 97           0   .03
653   -.8320168  2.61  3.09  -.68 -1.91 -1.95   0 1 1 1  .015854314 97  .015854314 -1.91
654   -.7724395 -2.04 -4.27  -.02   .92   .47   0 1 1 1 -.007810143 97 -.007810143   .92
655   -.7282271  4.24    .3  -.58  -.61   -.7   0 1 1 1   .05508108 97   .05508108  -.61
656   -.4211756 -1.97 -3.75 -1.31  1.24  -.53   0 1 1 1   .06295789 97   .06295789  1.24
657    .4413366  2.52   3.8 -1.82  -.48  -.19   0 1 1 1  .006446443 97  .006446443  -.48
658   -.8405004  2.55 -2.29 -2.87  1.49    .2   0 1 1 1 -.006991793 97 -.006991793  1.49
659   .29060632  -.06  2.86  2.18 -1.16   .88   0 1 1 1    .0529222 97    .0529222 -1.16
660  -.51582384 -3.11  -.88  -3.5  1.68 -1.65   0 1 1 1   -.1531569 97   -.1531569  1.68
661   -.4917158  6.14   .23 -1.89 -1.16 -1.78   0 1 1 1   .04355939 97   .04355939 -1.16
662  -.05449453 -1.12  3.04  -.43    .1  -.51   0 1 1 1  -.02349115 97  -.02349115    .1
663   1.7682045   .59 -3.05  1.84  -.04  -.45   0 1 1 1  .035089232 97  .035089232  -.04
664    .1549665  1.36   .81 -1.19 -1.82  -.74   0 1 1 1  .035777695 97  .035777695 -1.82
665    .9248865 -1.53  2.86  -.76   .42  -1.5   0 1 1 1   .03456662 97   .03456662   .42
666  -.51957136  1.54 -4.51 -4.19    .1  -2.5   0 1 1 1   .05052426 97   .05052426    .1
667   -.9541405 -6.04   .39  2.63   .69  1.24   0 1 1 1  -.08612797 97  -.08612797   .69
668   2.0981243 -3.07 -2.77   .51  1.86  -.45   0 1 1 1  -.04350589 97  -.04350589  1.86
669   -.3357938  7.75 -2.18  -.21   .87   .41   0 1 1 1    .0770238 97    .0770238   .87
670    .9741321   .56  3.37  -.53 -2.64 -1.08   0 1 1 1   .03873625 97   .03873625 -2.64
671   -.7577139 -2.17    -3 -2.52   .45   .04 .01 1 1 1 -.031684853 97  -.04168485   .44
672    .1876454 -5.77 -3.41  1.98  2.81  3.05 .01 1 1 1   -.1598321 97  -.16983213   2.8
673   .27772656  -.08   .98  -.56  3.34  2.12 .02 1 1 1  -.11457096 97  -.13457096  3.32
674    -.621363  6.96  1.08  1.06   .77  -.08 .02 1 1 1   .08389845 97  .063898444   .75
675   -.5156671   .92  1.17   3.3 -2.89  2.01 .01 1 1 1    .0769271 97    .0669271  -2.9
676    -.669097  1.78  -.71 -1.72 -1.19 -2.52 .01 1 1 1   .01579454 97   .00579454  -1.2
677  -.18034604  -.05    .5 -1.46  1.41  1.98 .02 1 1 1  -.09974915 97  -.11974914  1.39
678   -.5001811  3.95  2.61 -1.23  1.14 -1.24 .02 1 1 1     .091932 97     .071932  1.12
679     -.31458    .5  1.67  3.24 -1.81  -.35 .02 1 1 1    .1190519 97    .0990519 -1.83
680   -.3065128   .25  1.78  -1.2 -2.13  -.06 .02 1 1 1 -.030364247 97  -.05036425 -2.15
681 -.006094114 -2.02 -4.08  4.04   .91   .21 .02 1 1 1   .05431573 97  .034315735   .89
682   -.9032302  4.86   6.8  8.15  -.07  3.78 .01 1 1 1   .28454354 97   .27454355  -.08
683  -.07185087  1.81   .41  3.49  1.14  -.29 .03 1 1 1    .0464054 97  .016405398  1.11
684   -.5030931  1.94 -1.34 -2.77   -.5  -.94 .04 1 1 1   .02443303 97  -.01556697  -.54
685    .5648496  3.57 -2.18 -1.78   .27 -1.74 .04 1 1 1   .09010552 97   .05010552   .23
686   .56005853   .17    .8 -3.25    .8 -1.04 .03 1 1 1  -.04135505 97  -.07135505   .77
687    .4321061  1.09   .48 -2.05  1.96 -1.58 .05 1 1 1  -.01059837 97  -.06059837  1.91
688     .452172  1.06  -3.1 -3.69  1.02 -1.93 .06 1 1 1  -.03663163 97  -.09663163   .96
689  -.10064785   .78  2.46  1.43 -2.23  -.05 .06 1 1 1   .08255441 97  .022554416 -2.29
690   -.5032098  1.87 -1.65  -.33  -.77  -.21 .07 1 1 1 -.005772489 97  -.07577249  -.84
691    1.514892   .16  -1.8  -2.3   .14 -2.42 .09 1 1 1 -.004557754 97  -.09455775   .05
692   -.3397476  2.51  4.79  3.11 -1.38  1.64 .09 1 1 1   .06069768 97  -.02930232 -1.47
693   .58235365  2.25 -1.96   .07   .93 -3.35 .09 1 1 1   .08089957 97 -.009100437   .84
694  -.27973685  3.12  -.33  -.06   3.3   .05 .08 1 1 1  .032858547 97  -.04714145  3.22
695   .00677294  1.06 -1.03   .27   .72  1.67 .09 1 1 1   .04792359 97  -.04207641   .63
696    .6013967  5.58  -3.2 -1.24  -.82  -.86 .11 1 1 1   .08401144 97 -.025988564  -.93
697  .011041225 -3.65   .37 -1.02   .58 -2.23 .11 1 1 1  .003124674 97  -.10687532   .47
698    1.256413 -2.35   3.6  -.14  -.45     0 .12 1 1 1  -.06217043 97   -.1821704  -.57
699    .4582822   .29   .96   .46 -2.33  1.18 .14 1 1 1 -.002333806 97   -.1423338 -2.47
700    2.458111  2.65  4.74 -3.15 -2.01 -1.44 .14 1 1 1  -.02540194 97  -.16540194 -2.15
701    .7331362   .48   .89 -2.27   .83   .34 .14 1 1 1   -.0292688 97   -.1692688   .69
702    .3634799  3.19 -1.95   .58  1.53    .4 .16 1 1 1   .09542326 97  -.06457674  1.37
703   1.2807873  3.44   .62 -3.87  -.15 -2.47 .16 1 1 1 .0016172507 97  -.15838274  -.31
704    .3231561   .06 -2.47  -1.7   .59  1.26 .15 1 1 1  -.04289338 97   -.1928934   .44
705    .1547048 -7.68 -4.57  3.62   .86  3.42 .19 1 1 1  -.06653293 97  -.25653294   .67
706   .12342313  1.69  -.79    .2  -.63   .33 .18 1 1 1  .032727633 97  -.14727238  -.81
707    .8793025 -9.55 -3.01 -1.88  -.09   .15 .19 1 1 1  -.12744075 97  -.31744075  -.28
708    .6319562  8.41  3.07  -.56  -.65 -1.36 .21 1 1 1    .1554367 97  -.05456328  -.86
709   1.2497272   3.4  1.79 -2.72   .09 -1.47 .18 1 1 1   .02669617 97  -.15330383  -.09
710    .2043876   1.1 -3.56  -4.2   .86 -1.03 .19 1 1 1  -.05123946 97  -.24123946   .67
711    2.945461  3.96 -1.17     2  1.64 -2.18 .21 1 1 1   .10837473 97  -.10162526  1.43
712    3.196913 -6.94 -1.52 -2.15  -.54  1.78 .21 1 1 1  -.13015136 97   -.3401514  -.75
713   .20777777  6.93   .33  -.82   .99  -.38 .18 1 1 1   .09609094 97  -.08390907   .81
714    1.672993  1.19  -1.9    .3  -.16   .34 .19 1 1 1   .05792966 97  -.13207033  -.35
715   1.1428357 -2.58  -3.3 -4.93   .43  -.88 .16 1 1 1  -.10332292 97  -.26332292   .27
716   1.2313054  1.43   .26  6.78  1.99   3.5 .18 1 1 1   .06712751 97   -.1128725  1.81
717    .9599003  2.06   .21 -2.09   .25  -.99 .15 1 1 1   .07199332 97  -.07800668    .1
718   .58086735  3.87    .5 -1.87 -1.58 -1.24 .12 1 1 1   .06555604 97  -.05444396  -1.7
719    3.268818  2.77   .96  1.93   .09  1.29 .14 1 1 1    .0627736 97   -.0772264  -.05
624  -1.0642962  5.05   2.1  -.99 -2.05 -1.41   0 2 1 1   .08692265 97   .08692265 -2.05
625  -1.1153159  4.42 -1.69   .32  -.38  -.06   0 2 1 1   .07576478 97   .07576478  -.38
626   -1.118736  3.11  -.51  1.19  -.57   .81   0 2 1 1   .07316217 97   .07316217  -.57
627  -1.1402786  -.85  -.51   -.8  1.26   .67   0 2 1 1  .027214566 97  .027214566  1.26
end
format %tm modate