Dear Statalisters,

I am looking for some help on running a regression in which I aim to find intercepts conditional on the state of the world (alpha's in asset pricing models). I am writing a paper on the effect of crisis periods on the relation between sustainable investing and the alpha (intercept/constant) they generate for two different groups of funds. Therefore I use a dummy variable to indicate whether a period is a crisis period or not. I first tried to split the sample based on the two groups of funds and then run separate regressions based on the state of the economy, but that way i run in to problems with the sign of the dummy changing multiple times as the date variable is then no longer continious and would ideally want all my data used for the IV's but the intercept to interact with the dummy variable. I would therefore ideally want one regression that captures both the intercept of the groups (SRI/Conventional) and the effect of the state of the world (Crisis/no crisis).

My current code is as follows:
Code:
preserve
keep if SRI == 1
tempfile SRIfunds
save `SRIfunds' 

newey return FF_MktRF FF_SMB FF_HML FF_MOM if Cov_long==0, lag(6)
outreg2 using myreg.doc, replace tstat ctitle(Model SRI carhartt) 
newey return FF_MktRF FF_SMB FF_HML FF_MOM if Cov_long==1, lag(6)
outreg2 append tstat
And my dataset as follows:

Please note that I already took average from all the funds to create one return variable per day.

Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input byte(SRI Cov_long) float return double(FF_MktRF FF_SMB FF_HML FF_RMW FF_CMA FF_MOM) float date
1 0    .006379191                 .0083                 -.001                  .001                -.0024                 .0026 -.0060999999999999995   1
1 0    .007291976                 .0079                 .0096                -.0016  -.004699999999999999                -.0002                -.0038   2
1 0   -.004741166                -.0021                -.0101                 -.008                -.0023                -.0008  -.006500000000000001   3
1 0   .0007920208                 .0029 -.0070999999999999995                -.0031                -.0036                -.0029                -.0021   4
1 0   -.006176188                -.0037                -.0032                -.0103                 .0013                -.0052 -.0039000000000000003   5
1 0   .0005522304                 .0016                 .0101  .0055000000000000005                -.0005                 .0008   .006999999999999999   6
1 0   .0010119135                 .0031                -.0023                 .0054                 .0018                 .0027                 .0076   7
1 0    -.00505751                 -.003                -.0064                -.0085                 .0004 -.0028000000000000004                -.0053   8
1 0   .0011036316                 .0029                 .0062                 -.001                -.0027 -.0014000000000000002  .0017000000000000001   9
1 0   -.006959572                -.0049                -.0095                 -.006                 .0058                  .004  -.009000000000000001  10
1 0    .000753706                 .0024                  .002                 .0021                 -.001                -.0009                 .0051  11
1 0   -.006586563                -.0038                -.0054                -.0003                -.0011                -.0003  .0034999999999999996  12
1 0   .0013496157                 .0033  .0007000000000000001                  .002                 .0016                -.0001                 .0019  13
1 0   -.004454306                -.0029 -.0007000000000000001                -.0032                 .0044                -.0037                 .0009  14
1 0     .00674743                 .0083  .0078000000000000005                 .0077                 -.002                 .0052                 .0115  15
1 0    .006251072                 .0084                 .0019  .0039000000000000003                -.0024 -.0014000000000000002                 .0049  16
1 0  -.0041151796                 -.001                -.0058  .0039000000000000003 -.0007000000000000001                -.0016                 .0053  17
1 0   -.003651189                -.0012                -.0004                -.0067                 .0011  .0007000000000000001                 .0002  18
1 0    -.00848583 -.0068000000000000005                -.0073                -.0044                 .0058                -.0015                -.0069  19
1 0  -.0003366514                     0                 .0084  -.005699999999999999 -.0040999999999999995                -.0022                -.0067  20
1 0  -.0020991121                 .0004                -.0006                 .0003                 .0021                -.0025                 .0043  21
1 0  -.0030068476                -.0002                -.0032 -.0028000000000000004                -.0032                  .002                -.0053  22
1 0    .006608968   .008199999999999999                 .0064  .0068000000000000005                -.0052                 .0036   .008199999999999999  23
1 0   -.005836584                -.0027                -.0062                -.0018                 .0005                -.0021                -.0027  24
1 0   -.002638263                -.0001                -.0038                -.0051  .0039000000000000003                -.0024                -.0026  25
1 0  -.0011492458                 .0006 -.0028000000000000004                -.0058                  .003                 -.001 -.0060999999999999995  26
1 0     .00516663                 .0072                 .0073                 .0002 -.0028000000000000004                 .0005   .004699999999999999  27
1 0   .0019717298                 .0038                  .004                 .0012                 .0003                 .0015 -.0034000000000000002  28
1 0    .002412963                 .0049                -.0027  .0034000000000000002                -.0001                 .0005                 .0025  29
1 0    .001660321  .0045000000000000005 -.0017000000000000001  .0034999999999999996 -.0045000000000000005 -.0007000000000000001                 .0009  30
1 0    .003021895                 .0054                 .0013                -.0044                 .0019                -.0008                -.0027  31
1 0  -.0035820846                -.0016                -.0022                -.0003  .0028000000000000004                -.0022                -.0008  32
1 0  .00004579462                  .002                -.0006  -.005600000000000001                 .0002 -.0039000000000000003                 -.004  33
1 0   .0038359875                  .006                 .0004                 .0012                 .0033  .0034000000000000002                 .0011  34
1 0      -.003908                -.0015 -.0039000000000000003                  .001                 .0048 -.0034000000000000002                -.0002  35
1 0  -.0036954596                -.0011 -.0070999999999999995                 .0026 -.0028000000000000004 -.0045000000000000005                -.0059  36
1 0 .000017883583                 .0015                -.0009                -.0095                 .0031                -.0021                 -.006  37
1 0   .0005009613                 .0022                 .0085 -.0034000000000000002                -.0037                -.0011                 .0018  38
1 0   -.007886097                -.0042  -.013500000000000002  .0017000000000000001                -.0006 -.0017000000000000001  .0007000000000000001  39
1 0      .0126194                 .0147                 .0051                 .0073                -.0049                 .0052                 .0126  40
1 0   -.008033554  -.006999999999999999                -.0054  -.009000000000000001   .006500000000000001                -.0046                -.0108  41
1 0  -.0004265263                 .0009                -.0018  .0014000000000000002                -.0005                -.0008                 .0062  42
1 0   -.005282883                -.0038 -.0040999999999999995                -.0008                -.0004                     0                 .0009  43
1 0   -.004697158                -.0036                -.0036                -.0006                 .0009                -.0025  .0014000000000000002  44
1 0   -.003099925                -.0019                -.0018                -.0084                 .0043                -.0073  -.006999999999999999  45
1 0  -.0014163863                 .0004                -.0051                -.0026                -.0058 -.0017000000000000001                -.0016  46
1 0    .002964036  .0034000000000000002                 .0005                 -.005                  .003                 .0002                -.0021  47
1 0   .0010793823                 .0013                 .0033                -.0006                -.0013                 .0005                 .0053  48
1 0  -.0044620726                -.0036                -.0022                     0                 .0049                -.0024 -.0014000000000000002  49
1 0    .008609341                 .0086                 .0073                -.0042 -.0007000000000000001  .0055000000000000005 -.0007000000000000001  50
1 0   -.001462624                -.0006                 .0044                 .0024                -.0012                -.0038 -.0014000000000000002  51
1 0  -.0010656733                -.0008   .005600000000000001                -.0029                 .0019                -.0003                 .0012  52
1 0  -.0039945142                -.0025                -.0016                -.0073                -.0016                -.0004                 .0003  53
1 0   -.015893232                -.0148                -.0139 -.0068000000000000005                 .0083                 .0029                -.0173  54
1 0   .0005957054                 .0016                -.0033  -.005600000000000001                 .0016                -.0013                 .0021  55
1 0  -.0008312807                -.0003                 .0073                 .0048                -.0001                 .0019  .0014000000000000002  56
1 0   -.001525199                -.0005                 .0012                -.0023 -.0028000000000000004                -.0033                 .0009  57
1 0  -.0011984714                -.0005   .004699999999999999                -.0049                -.0021 -.0028000000000000004 -.0034000000000000002  58
1 0    .005841526                 .0072                -.0006                 .0072                 .0004  .0039000000000000003  .0039000000000000003  59
1 0   .0011109618                 .0018                 .0033                -.0006                -.0025                 .0013  -.004699999999999999  60
1 0   .0021300872                 .0036  .0040999999999999995                 .0092                -.0005                -.0013  .0070999999999999995  61
1 0   -.001846141                -.0016  .0055000000000000005                -.0032                 .0003  .0007000000000000001                -.0003  62
1 0   -.007363415 -.0028000000000000004  -.011399999999999999                -.0011 -.0017000000000000001                -.0008                 .0003  63
1 0   -.003964746                 .0005                -.0023                 .0032                -.0009                 .0016  .0039000000000000003  64
1 0   -.007274104                -.0044  -.008199999999999999                -.0031  .0045000000000000005                -.0009 -.0045000000000000005  65
1 0    .001298278                 .0032                 .0075                 .0048                -.0012                 .0037                 .0003  66
1 0  -.0037507056                -.0008                 .0008                -.0026                 .0001                -.0002                -.0001  67
1 0  -.0014472653                 .0008                 .0015  .0007000000000000001                 .0019   .004699999999999999  -.009000000000000001  68
1 0      -.002529                -.0005                  .008                 .0021                  .002                 .0019                 .0018  69
1 0   -.008501717                -.0049  -.009300000000000001                -.0053 -.0007000000000000001 -.0055000000000000005                 -.006  70
1 0   -.009780758                -.0075                -.0033                -.0079                -.0001                -.0036 -.0028000000000000004  71
1 0    .005807308                 .0089                 .0027                 .0022                 .0003                -.0015                 .0051  72
1 0    -.00573377                -.0025                  .003                -.0018                 .0032                 .0011                -.0002  73
1 0   -.002583687                -.0008   .005600000000000001                -.0043                 .0044                -.0084  .0017000000000000001  74
1 0    .005531873                 .0083                 .0058                 .0026                 .0024                -.0018                 .0043  75
1 0   -.005974245 -.0028000000000000004                 .0005 -.0014000000000000002  .0034999999999999996                -.0021                 .0018  76
1 0    .008646902                 .0118                 .0027                 .0049                -.0006                 .0015   .009300000000000001  77
1 0   .0031739445                 .0066  .0039000000000000003                -.0005                -.0036                 .0029                 .0013  78
1 0  -.0020676733                 .0004                 .0075                 .0031                 .0024                 .0001                -.0029  79
1 0   -.001662742                 .0005                -.0021                -.0096                 .0021                -.0059                 .0023  80
1 0   -.007231133                 -.003                -.0074 -.0060999999999999995                  .001                -.0021                 -.001  81
1 0   -.001439737                 .0021                 .0024                -.0013                -.0018                -.0051   .009399999999999999  82
1 0   -.002475187                 .0003                -.0046                -.0019  .0039000000000000003 -.0034000000000000002  -.005699999999999999  83
1 0   -.005524357                -.0019                -.0052                 .0022                -.0004                 .0012                 .0001  84
1 0  -.0018194335                 .0002                -.0012                -.0038                 .0037                -.0072                -.0003  85
1 0   .0019751308                 .0046                 .0009                 .0004                -.0021                 .0063                -.0029  86
1 0  -.0040871934                -.0004                -.0022                 .0026                 .0011                 .0002                 .0013  87
1 0   -.003243554                -.0005                  .004                 -.008                 .0036                -.0036                -.0004  88
1 0  -.0007118916                 .0021                 .0025                 .0004                 -.003  .0034999999999999996                 .0006  89
1 0   -.006104197                -.0026 -.0039000000000000003                -.0015                -.0027                -.0002  .0007000000000000001  90
1 0    -.00596642                -.0018                -.0038 -.0060999999999999995 -.0028000000000000004                -.0032                 .0032  91
1 0    .002847914                 .0053                 .0026                 .0021                -.0031                 .0003                 .0008  92
1 0   -.003466656                -.0003                  .001                -.0008                -.0025 -.0014000000000000002                 .0084  93
1 0     -.0215444                -.0197                -.0096                -.0052                 .0052                 .0029  -.015300000000000001  94
1 0 -.00019414278                  .004                -.0002                 -.004                -.0031 -.0060999999999999995   .006500000000000001  95
1 0    .004094635   .006999999999999999 -.0034000000000000002  .0039000000000000003                 -.001                 .0076                -.0019  96
1 0    .002342031   .005600000000000001                 .0024                -.0027                -.0004                -.0033                 .0036  97
1 0  -.0016566098                 .0018                -.0002                 .0062                -.0023                 .0008                 .0048  98
1 0   -.000604378                 .0024                -.0021                -.0048                 .0018                 -.003                  .001  99
1 0   .0012043547                 .0042                -.0037                -.0074   .005600000000000001                -.0063                 .0058 100
end
I hope someone can provide me some guidance on how to properly code this in Stata.