Hello everyone,

I am currently sitting on an understanding issue. I want to hold my regression for monthly date fix.

I use the following code:
Code:
xtset company modate
xtreg rirf zdeals cdo i.modate, fe vce(cluster company)
The variable modate is formated into %tm.

However, is this the right way to hold for monthly fix or do I need to set it up something like this

Code:
xtset company modate
xtreg rirf zdeals cdo i.month, fe vce(cluster company)
where the variable month represents the months 1 to 12 (i.e. Jan to Dec). While modate represents the year + month (i.e. 2016m1 to 2016m12)

My Data looks like this

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte fintech float(modate zdeals) double mktrf byte(company cdo) float(month rirf zdealscdo)
1 625   -.9097333  5.423465823376711 1 1  2   6.087671   -.9097333
1 626    -.681587 -1.535614543637456 1 1  3  1.4377487    -.681587
1 627   -.7956602  1.820664480585781 1 1  4  1.6504712   -.7956602
1 628   -.9097333 -11.16581611074039 1 1  5 -12.114104   -.9097333
1 629   -.9097333  6.186169449456423 1 1  6  12.190808   -.9097333
1 630   -.9097333  1.412244213720733 1 1  7  -4.972528   -.9097333
1 631   -.5675139  3.164426696734882 1 1  8   4.917805   -.5675139
1 632  -1.1378796  2.535894143293762 1 1  9   6.510133  -1.1378796
1 633  -1.0238065  .1733146414328417 1 1 10   6.899674  -1.0238065
1 634  -1.0238065  .4869778359516951 1 1 11   4.175822  -1.0238065
1 635   -.4534408   1.71455311626784 1 1 12  2.8711524   -.4534408
1 636   -.9097333  2.881624585225847 1 1  1   8.031503   -.9097333
1 637   -.9097333 -2.422422854031386 1 1  2 -2.3237028   -.9097333
1 638   -.9097333  2.291088012456323 1 1  3  -2.348695   -.9097333
1 639   -.9097333   2.55111964290022 1 1  4    2.61446   -.9097333
1 640   -.7956602 -.3282772939126765 1 1  5  1.3528867   -.7956602
0 641  -.11122131 -5.215353268857719 1 1  6  -6.042301  -.11122131
1 642  -.22529446  6.373419662957986 1 1  7   9.572143  -.22529446
1 643   -.7956602   1.35546086185017 1 1  8  -6.926646   -.7956602
1 644   -.5675139  4.908637669124174 1 1  9  3.6370144   -.5675139
1 645   -.7956602  3.389633878892556 1 1 10  1.9880623   -.7956602
1 646  -.22529446  1.137170013494472 1 1 11   1.899806  -.22529446
1 647    -.681587  2.963653535733998 1 1 12 -1.8031834    -.681587
1 648   .11692497 -3.890885737730981 1 1  1  -6.104285   .11692497
1 649   -.5675139   8.23975345819777 1 1  2   2.373815   -.5675139
1 650   .11692497 -3.139740083406342 1 1  3 -2.2344146   .11692497
1 651   -.3393676  3.529635482257981 1 1  4   .6857252   -.3393676
1 652   -.7956602  .0061039720005996 1 1  5  4.4270663   -.7956602
1 653    .4591444  .9713370371937565 1 1  6  -3.979814    .4591444
1 654  -.22529446 -2.454856568847279 1 1  7   5.949186  -.22529446
1 655   -.5675139  .3703227976121503 1 1  8    1.68683   -.5675139
1 656   -.4534408 -5.651307857986811 1 1  9  -6.303838   -.4534408
1 657 .0028518285 -2.931640582667906 1 1 10  1.7595673 .0028518285
0 658    -.681587   .795269560694315 1 1 11  -2.540254    -.681587
1 659  -.11122131 -2.275725887171038 1 1 12  -4.903257  -.11122131
1 660  -.22529446 -1.095126202174831 1 1  1  -3.550321  -.22529446
1 661   -.4534408  7.308772758403578 1 1  2  -2.592427   -.4534408
1 662   -.3393676 -6.830832724400227 1 1  3 -2.3304307   -.3393676
1 663    .5732176  7.510445075202272 1 1  4   16.84458    .5732176
1 664  -.22529446  .4179245193042307 1 1  5 -3.6498814  -.22529446
1 665    .2309981 -3.332705799761425 1 1  6  -5.687866    .2309981
1 666    .2309981  .5458590972385735 1 1  7   .8527115    .2309981
1 667  -.11122131 -6.677909866827684 1 1  8  -10.85039  -.11122131
1 668  -.11122131 -4.708917819914864 1 1  9  -5.354208  -.11122131
1 669  -.11122131  6.458271024815713 1 1 10   5.073513  -.11122131
0 670   .11692497 -2.414133757727071 1 1 11  1.6250218   .11692497
1 671    .4591444 -3.446910622000012 1 1 12  -.8892289    .4591444
1 672   .11692497 -5.275597882360379 1 1  1 -11.684743   .11692497
1 673    .3450713  .5066665751035179 1 1  2  -8.309761    .3450713
1 674    .6872907  5.741306038962422 1 1  3   .5252813    .6872907
0 675   -.4534408  2.791006199625206 1 1  4   6.250824   -.4534408
1 676    .5732176 -.2410533711039446 1 1  5  -.7456102    .5732176
1 677    .2309981 -3.660051047326899 1 1  6  -3.887061    .2309981
1 678    .6872907  3.162686339794692 1 1  7   5.515573    .6872907
1 679    .3450713 -.2256542228468195 1 1  8  14.003398    .3450713
1 680   1.0295101  .7916563646363125 1 1  9   1.700826   1.0295101
1 681    .6872907 -6.234801490421922 1 1 10  1.3804516    .6872907
1 682   -.4534408 -.6740285016359504 1 1 11   5.473505   -.4534408
1 683    .2309981  3.750327132390216 1 1 12   2.302256    .2309981
1 684   2.2843146   1.88845282151261 1 1  1   4.824042   2.2843146
1 685 .0028518285  3.012971650151111 1 1  2  -3.046881 .0028518285
1 686     .915437  1.896847085249752 1 1  3  1.1600258     .915437
1 687    .8013638   2.56877228764926 1 1  4   1.167601    .8013638
1 688 .0028518285  4.606547552317522 1 1  5   7.133211 .0028518285
1 689    1.713949 -3.036390515438898 1 1  6   5.989054    1.713949
1 690   1.0295101  1.577754876582696 1 1  7   7.943089   1.0295101
1 691    .8013638 -.0629860039698094 1 1  8 -2.1494107    .8013638
1 692    .8013638  3.640777299761977 1 1  9  2.2535782    .8013638
1 693   1.2576565  1.255204239825658 1 1 10  -.4181632   1.2576565
1 694    1.828022 -.6738529348441805 1 1 11  1.8486238    1.828022
1 695   1.2576565  4.960135542977158 1 1 12   4.367795   1.2576565
1 696   1.1435833  2.428175467637881 1 1  1  2.9823666   1.1435833
1 697    .6872907 -6.891485196342187 1 1  2  -5.605506    .6872907
1 698   1.1435833  .8047783298276583 1 1  3  -5.551962   1.1435833
1 699     .915437  4.065851746799259 1 1  4   6.997572     .915437
0 700    .6872907  -.047381201897914 1 1  5  -3.088691    .6872907
1 701     .915437 -.4992862551811801 1 1  6  -2.195128     .915437
0 702   2.2843146   .659978189597538 1 1  7  2.0669715   2.2843146
1 703    .4591444 -3.928250618093852 1 1  8  -8.327696    .4591444
0 704   1.9420953  1.140803414324776 1 1  9   .3992448   1.9420953
1 705   1.0295101  -7.69640140989817 1 1 10 -4.5901623   1.0295101
1 706    1.713949 -2.843840719369948 1 1 11   2.786053    1.713949
1 707   1.3717295 -3.959268999900607 1 1 12  -2.849913   1.3717295
1 708   1.3717295  8.884163509760876 1 1  1   1.938906   1.3717295
1 709   1.5998758  3.134493315609825 1 1  2 -.57028633   1.5998758
1 710    .2309981  1.488231177052129 1 1  3  -.4467114    .2309981
1 711    .8013638  1.965470919129246 1 1  4   7.002846    .8013638
1 712    2.398388 -6.369458417225107 1 1  5  -5.469872    2.398388
1 713   2.2843146  4.875298554327168 1 1  6  2.7505054   2.2843146
1 714   1.5998758 -1.414019715957383 1 1  7 -3.8905034   1.5998758
1 715   1.0295101 -3.193586706230526 1 1  8  -9.254444   1.0295101
1 716   2.2843146  3.207729445865145 1 1  9    6.79653   2.2843146
1 717   1.0295101  2.930793108493158 1 1 10  -.7248337   1.0295101
1 718    .2309981  2.413054182900358 1 1 11 -1.2622154    .2309981
1 719   1.5998758  5.582421782981512 1 1 12   5.119082   1.5998758
1 625   -.9097333  5.423465823376711 2 1  2  18.113564   -.9097333
1 626    -.681587 -1.535614543637456 2 1  3 -4.0038166    -.681587
1 627   -.7956602  1.820664480585781 2 1  4  -5.748455   -.7956602
1 628   -.9097333 -11.16581611074039 2 1  5 -23.108866   -.9097333
1 629   -.9097333  6.186169449456423 2 1  6  -5.904023   -.9097333
end
format %tm modate
Thanks