Announcement

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

  • Missing F-Stat for regression with robust SE - Not a problem with singleton dummy variables


    Dear Statalist community,

    Currently I am conducting an event study on ad hoc disclosures. The regression model I use contains some evidence for heteroscedasticity so I decided to use robust SE. Regrettably, Stata does not report an F-statistic in this case (when I use the “normal” –reg- command it does report it by the way).

    I googled a lot and read other Statalist threads but they always report problems with singleton dummy variables. My model contains 17 dummy variables but none of them seems to be a singleton dummy variable. Also I don't get an error message or something like that. Does anybody have an idea what the problem might be?

    The command I used to regress using robust SE is the following:

    Code:
    reg CAR_gesamt Regelpublizität Dividenden Aktienrückkauf Anleihe Kapitalerhöhung MA Kooperation Beteiligung Verkauf Personalveränderung Rechtssache Strategie Auftragseingang Insolvenz Sonstiges Zeit GeneralStandard Scale MarketCapln TotalAssetsln ReturnonAssets if n_disclosurecount_tag==1, vce(robust)


    CAR_gesamt, MarketCapln, TotalAssetsln, ReturnonAssets and Zeit are numeric variables, the rest of them are dummy variables.

    If anybody could help me I would be really grateful!


    Thanks in advance,

    Cecilia


  • #2
    Perhaps you are overlooking something in your regression output that will provide further information.

    As section 12.1 of the Statalist FAQ tells us,

    12.1 What to say about your commands and your problem

    Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly!.
    It would be particularly helpful to copy your command and output from your Stata Results window and paste that into your Statalist post using code delimiters [CODE] and [/CODE], as described in section 12 of the FAQ.

    The more you help others understand your problem, the more likely others are to be able to help you solve your problem.

    Comment


    • #3
      I am sorry, you are right. I hoped it would be more like a general problem, so I did not post the output.

      I actually have three outputs because I have three dependent variables: CAR_gesamt which means total cumulative abnormal returns, CAR_gesamt_positive which refers only to positive cumulative abnormal returns and CAR_gesamt_negativ which contains only negative cumulative abnormal returns.

      Thus, I get the following three outputs using the aforementioned command, just changing the dependent variables:

      Code:
      reg CAR_gesamt Regelpublizität Dividenden Aktienrückkauf Anleihe Kapitalerhöhung MA Kooperation Beteiligung Verkauf Personalveränderung Rechtssache Strategie Auftragseingang Insolvenz Sonstiges Zeit MarketCapln TotalAssetsln GeneralStandard Scale ReturnonAssets if n_disclosurecount_tag==1, vce(robust)

      Code:
      Linear regression                               Number of obs     =      1,910
                                                      F(20, 1888)       =          .
                                                      Prob > F          =          .
                                                      R-squared         =     0.0203
                                                      Root MSE          =     .22202
      
      -------------------------------------------------------------------------------------
                          |               Robust
               CAR_gesamt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      --------------------+----------------------------------------------------------------
          Regelpublizität |   .0346433   .0098256     3.53   0.000     .0153732    .0539134
               Dividenden |    .036643   .0118994     3.08   0.002     .0133057    .0599803
           Aktienrückkauf |   .0418391   .0096198     4.35   0.000     .0229725    .0607057
                  Anleihe |   .0343144   .0280485     1.22   0.221     -.020695    .0893237
          Kapitalerhöhung |    .017955   .0135757     1.32   0.186    -.0086699    .0445799
                       MA |   .0481007   .0121212     3.97   0.000     .0243284    .0718729
              Kooperation |   .1034536   .0270035     3.83   0.000     .0504938    .1564135
              Beteiligung |   .0744864   .0144003     5.17   0.000     .0462443    .1027285
                  Verkauf |   .0479639   .0281547     1.70   0.089    -.0072537    .1031815
      Personalveränderung |   .0155133   .0125134     1.24   0.215    -.0090282    .0400548
              Rechtssache |   .0090666   .0210047     0.43   0.666    -.0321283    .0502615
                Strategie |   .0370645   .0578847     0.64   0.522    -.0764601    .1505892
          Auftragseingang |   .0854783    .020662     4.14   0.000     .0449555    .1260011
                Insolvenz |   .0939476   .1720563     0.55   0.585     -.243493    .4313881
                Sonstiges |  -.0064238   .0209867    -0.31   0.760    -.0475833    .0347357
                     Zeit |  -1.60e-14   9.60e-15    -1.67   0.096    -3.48e-14    2.82e-15
              MarketCapln |   .0152107   .0123968     1.23   0.220    -.0091021    .0395235
            TotalAssetsln |  -.0091281   .0087437    -1.04   0.297    -.0262765    .0080203
          GeneralStandard |   .0146988   .0150551     0.98   0.329    -.0148275    .0442252
                    Scale |    .024613   .0160091     1.54   0.124    -.0067843    .0560103
           ReturnonAssets |  -.0006545   .0006804    -0.96   0.336    -.0019889    .0006799
                    _cons |  -.1459188   .0657184    -2.22   0.027    -.2748072   -.0170304
      -------------------------------------------------------------------------------------
      Code:
       
      reg CAR_gesamt_positiv Regelpublizität Dividenden Aktienrückkauf Anleihe Kapitalerhöhung MA Kooperation Beteiligung Verkauf Personalveränderung Rechtssache Strategie Auftragseingang Insolvenz Sonstiges Zeit MarketCapln TotalAssetsln GeneralStandard Scale ReturnonAssets if n_disclosurecount_tag==1, vce(robust)

      Code:
      Linear regression                               Number of obs     =        909
                                                      F(20, 887)        =          .
                                                      Prob > F          =          .
                                                      R-squared         =     0.1618
                                                      Root MSE          =      .1708
      
      -------------------------------------------------------------------------------------
                          |               Robust
       CAR_gesamt_positiv |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      --------------------+----------------------------------------------------------------
          Regelpublizität |   .0133361   .0108227     1.23   0.218     -.007905    .0345772
               Dividenden |   .0007233   .0160668     0.05   0.964      -.03081    .0322566
           Aktienrückkauf |   .0018905   .0114669     0.16   0.869     -.020615    .0243959
                  Anleihe |   .0294088   .0314745     0.93   0.350    -.0323645    .0911821
          Kapitalerhöhung |   .0023494   .0157071     0.15   0.881    -.0284781    .0331769
                       MA |   .0325903   .0116005     2.81   0.005     .0098227     .055358
              Kooperation |   .0202378   .0286863     0.71   0.481    -.0360632    .0765388
              Beteiligung |   .0128323   .0119777     1.07   0.284    -.0106755    .0363402
                  Verkauf |   .0530642   .0366234     1.45   0.148    -.0188144    .1249428
      Personalveränderung |   .0004881   .0117124     0.04   0.967    -.0224992    .0234754
              Rechtssache |   .0228309   .0234322     0.97   0.330    -.0231581    .0688199
                Strategie |   .0690418   .0407355     1.69   0.090    -.0109073     .148991
          Auftragseingang |   .0330857   .0200519     1.65   0.099     -.006269    .0724404
                Insolvenz |   .3863657    .216513     1.78   0.075    -.0385718    .8113033
                Sonstiges |   .0358996    .027408     1.31   0.191    -.0178924    .0896917
                     Zeit |  -3.79e-11   5.62e-11    -0.67   0.500    -1.48e-10    7.24e-11
              MarketCapln |  -.0064207   .0139103    -0.46   0.644    -.0337218    .0208803
            TotalAssetsln |  -.0051993   .0106461    -0.49   0.625    -.0260939    .0156952
          GeneralStandard |   .0351406   .0178779     1.97   0.050     .0000527    .0702285
                    Scale |  -.0178708    .013933    -1.28   0.200    -.0452163    .0094747
           ReturnonAssets |  -.0010079   .0005695    -1.77   0.077    -.0021256    .0001098
                    _cons |  -71.58165   106.4161    -0.67   0.501    -280.4384    137.2751
      -------------------------------------------------------------------------------------

      Code:
         
      reg CAR_gesamt_negativ Regelpublizität Dividenden Aktienrückkauf Anleihe Kapitalerhöhung MA Kooperation Beteiligung Verkauf Personalveränderung Rechtssache Strategie Auftragseingang Insolvenz Sonstiges Zeit MarketCapln TotalAssetsln GeneralStandard Scale ReturnonAssets if n_disclosurecount_tag==1, vce(robust)

      Code:
      
      Linear regression                               Number of obs     =      1,001
                                                      F(20, 979)        =          .
                                                      Prob > F          =          .
                                                      R-squared         =     0.1381
                                                      Root MSE          =     .20264
      
      -------------------------------------------------------------------------------------
                          |               Robust
       CAR_gesamt_negativ |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      --------------------+----------------------------------------------------------------
          Regelpublizität |   .0407928   .0106433     3.83   0.000     .0199066    .0616791
               Dividenden |    .050257   .0135227     3.72   0.000     .0237201    .0767939
           Aktienrückkauf |   .0517575   .0125206     4.13   0.000     .0271873    .0763277
                  Anleihe |   .0068625   .0353374     0.19   0.846    -.0624833    .0762083
          Kapitalerhöhung |   .0247777   .0145614     1.70   0.089    -.0037974    .0533529
                       MA |   .0102019   .0146016     0.70   0.485     -.018452    .0388559
              Kooperation |   .0775656   .0283728     2.73   0.006     .0218872     .133244
              Beteiligung |   .0438398   .0112344     3.90   0.000     .0217936     .065886
                  Verkauf |  -.0090703   .0279294    -0.32   0.745    -.0638786     .045738
      Personalveränderung |   .0177453   .0150552     1.18   0.239    -.0117989    .0472895
              Rechtssache |   .0174292   .0214035     0.81   0.416    -.0245728    .0594313
                Strategie |   -.084871   .1113765    -0.76   0.446    -.3034351    .1336932
          Auftragseingang |   .0419292   .0154199     2.72   0.007     .0116692    .0721891
                Insolvenz |  -.3709435   .1349949    -2.75   0.006     -.635856   -.1060309
                Sonstiges |  -.0411137   .0207829    -1.98   0.048    -.0818979   -.0003295
                     Zeit |   2.61e-14   6.63e-15     3.94   0.000     1.31e-14    3.91e-14
              MarketCapln |   .0193138    .015125     1.28   0.202    -.0103673    .0489948
            TotalAssetsln |  -.0004801   .0091585    -0.05   0.958    -.0184526    .0174924
          GeneralStandard |    -.01767   .0146548    -1.21   0.228    -.0464284    .0110884
                    Scale |   .0383542   .0234047     1.64   0.102    -.0075749    .0842834
           ReturnonAssets |  -.0004225   .0009551    -0.44   0.658    -.0022968    .0014518
                    _cons |  -.2934315   .0946442    -3.10   0.002    -.4791603   -.1077027
      -------------------------------------------------------------------------------------



      Just in case it helps I also give you the command and output on "normal" Regression of CAR_gesamt:




      Code:
       
      reg CAR_gesamt Regelpublizität Dividenden Aktienrückkauf Anleihe Kapitalerhöhung MA Kooperation Beteiligung Verkauf Personalveränderung Rechtssache Strategie Auftragseingang Insolvenz Sonstiges Zeit MarketCapln TotalAssetsln GeneralStandard Scale ReturnonAssets if n_disclosurecount_tag==1

      Code:
            Source |       SS           df       MS      Number of obs   =     1,910
      -------------+----------------------------------   F(21, 1888)     =      1.86
             Model |   1.9296357        21  .091887414   Prob > F        =    0.0100
          Residual |   93.062259     1,888  .049291451   R-squared       =    0.0203
      -------------+----------------------------------   Adj R-squared   =    0.0094
             Total |  94.9918947     1,909  .049760029   Root MSE        =    .22202
      
      -------------------------------------------------------------------------------------
               CAR_gesamt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
      --------------------+----------------------------------------------------------------
          Regelpublizität |   .0346433   .0190342     1.82   0.069    -.0026869    .0719736
               Dividenden |    .036643   .0327038     1.12   0.263    -.0274964    .1007824
           Aktienrückkauf |   .0418391   .0293057     1.43   0.154    -.0156358     .099314
                  Anleihe |   .0343144    .028042     1.22   0.221    -.0206823     .089311
          Kapitalerhöhung |    .017955   .0213754     0.84   0.401    -.0239669    .0598769
                       MA |   .0481007   .0209343     2.30   0.022     .0070438    .0891575
              Kooperation |   .1034536   .0402453     2.57   0.010     .0245237    .1823836
              Beteiligung |   .0744864   .0364062     2.05   0.041     .0030858     .145887
                  Verkauf |   .0479639   .0273432     1.75   0.080    -.0056621    .1015899
      Personalveränderung |   .0155133   .0193277     0.80   0.422    -.0223926    .0534193
              Rechtssache |   .0090666   .0340207     0.27   0.790    -.0576554    .0757887
                Strategie |   .0370645   .0264856     1.40   0.162    -.0148795    .0890086
          Auftragseingang |   .0854783    .038209     2.24   0.025     .0105421    .1604145
                Insolvenz |   .0939476    .047098     1.99   0.046      .001578    .1863172
                Sonstiges |  -.0064238   .0231799    -0.28   0.782    -.0518848    .0390371
                     Zeit |  -1.60e-14   4.25e-14    -0.38   0.706    -9.93e-14    6.73e-14
          GeneralStandard |   .0146988   .0146801     1.00   0.317     -.014092    .0434897
                    Scale |    .024613   .0208717     1.18   0.238    -.0163211    .0655471
              MarketCapln |   .0152107   .0046583     3.27   0.001     .0060747    .0243467
            TotalAssetsln |  -.0091281   .0040891    -2.23   0.026    -.0171476   -.0011085
           ReturnonAssets |  -.0006545   .0002769    -2.36   0.018    -.0011975   -.0001115
                    _cons |  -.1459188   .0882021    -1.65   0.098    -.3189026     .027065
      -------------------------------------------------------------------------------------

      As you can see, the F-statistic (and adjusted R²) are reported conducting "normal" linear Regression (the same holds for CAR_gesamt_positiv and CAR_gesamt_negativ), but not for robust SE regression.


      Maybe you need information on the dummy variables as well:

      Code:
      tabstat Regelpublizität Dividenden Aktienrückkauf Anleihe Kapitalerhöhung MA Kooperation Beteiligung Verkauf Personalveränderung Rechtssache Strategie Auftragseingang Insolvenz Sonstiges GeneralStandard Scale if n_disclosurecount_tag==1, s(sum) col(stat)


      Code:
          variable |       sum
      -------------+----------
      Regelpubli~t |       270
        Dividenden |        56
      Aktienrück~f |        73
           Anleihe |        83
      Kapitalerh~g |       183
                MA |       196
       Kooperation |        35
       Beteiligung |        43
           Verkauf |        88
      Personalve~g |       254
       Rechtssache |        51
         Strategie |        95
      Auftragsei~g |        39
         Insolvenz |        28
         Sonstiges |       139
      GeneralSta~d |       432
             Scale |       141


      Since none of them equals 1 I assume that there is no singleton dummy variable included in the model.


      Please inform me if you need any further information .

      Thanks a lot for your help!!
      Last edited by Cecilia Roesen; 14 Dec 2018, 08:11.

      Comment


      • #4
        Maybe I should add the fact, that from a theoretical point of view the results for the p-values of the robust SE Regression are a lot more plausible than the results of the normal linear regression. So it would be really great if there was a way to report F-stat and R² adj. as well!!

        Comment


        • #5
          Your Zeit variable is strange. Apparently (given the coefficient estimates) it takes very large values. Can you tell us more about it?
          Code:
          describe Zeit
          codebook Zeit
          summarize Zeit, detail
          If you were to tell us more about Zeit, and post the results of running these commands, someone might be able to suggest a better way of treating Zeit,

          In particular, I wonder if the vce(robust) code is finding Zeit difficult to deal with. You might try leaving Zeit out of one of your vce(robust) models and seeing if that results in the F-statistic returning to the model results.

          Comment


          • #6
            It's funny, I also thought that "Zeit" might be the problem. Zeit stands for "time" and basically represents the time when the ad hoc message was published. Therefore it is formatted as %tcHH:MM:SS.

            Code:
            
            . describe Zeit
            
                          storage   display    value
            variable name   type    format     label      variable label
            ---------------------------------------------------------------------------------------------------------
            Zeit            double  %tc..                 Zeit
            
            
            
            codebook Zeit
            
            -----------------------------------------------------------------------------------------------------------------------------
            Zeit                                                                                                                     Zeit
            -----------------------------------------------------------------------------------------------------------------------------
            
                              type:  numeric (double)
            
                             range:  [-1.893e+12,1.842e+12]       units:  10000
                     unique values:  845                      missing .:  0/21,010
            
                              mean:  -1.9e+12
                          std. dev:   1.2e+11
            
                       percentiles:        10%       25%       50%       75%       90%
                                      -1.9e+12  -1.9e+12  -1.9e+12  -1.9e+12  -1.9e+12
            
            
            
             summarize Zeit, detail
            
                                        Zeit
            -------------------------------------------------------------
                  Percentiles      Smallest
             1%    -1.89e+12      -1.89e+12
             5%    -1.89e+12      -1.89e+12
            10%    -1.89e+12      -1.89e+12       Obs              21,010
            25%    -1.89e+12      -1.89e+12       Sum of Wgt.      21,010
            
            50%    -1.89e+12                      Mean          -1.89e+12
                                    Largest       Std. Dev.      1.21e+11
            75%    -1.89e+12       1.84e+12
            90%    -1.89e+12       1.84e+12       Variance       1.46e+22
            95%    -1.89e+12       1.84e+12       Skewness       30.85452
            99%    -1.89e+12       1.84e+12       Kurtosis       953.0015


            Please note that the number of observations is misrepresented.
            Nonetheless the data is arranged the way that mean/sd etc. are not affected.

            It becomes clear if I type in the "correct" command for summarize, so please don't worry about the number of observations:

            Code:
            . summarize Zeit if n_disclosurecount_tag==1, detail
            
                                        Zeit
            -------------------------------------------------------------
                  Percentiles      Smallest
             1%    -1.89e+12      -1.89e+12
             5%    -1.89e+12      -1.89e+12
            10%    -1.89e+12      -1.89e+12       Obs               1,910
            25%    -1.89e+12      -1.89e+12       Sum of Wgt.       1,910
            
            50%    -1.89e+12                      Mean          -1.89e+12
                                    Largest       Std. Dev.      1.21e+11
            75%    -1.89e+12      -1.89e+12
            90%    -1.89e+12      -1.89e+12       Variance       1.46e+22
            95%    -1.89e+12       1.84e+12       Skewness       30.85452
            99%    -1.89e+12       1.84e+12       Kurtosis       953.0015


            I simply wonder if it is even "allowed" to use time variables in regression models. I thought of including dummy variables for certain time periods but then I got multicollinearity problems so this is not really an option, either. Is it may be possible to adjust the format? I don't really know how Stata works with respect to time variables, but if you, for example, define a time variable in Microsoft Excel and change the format to "default" you get numerical values that are not too high. Stata seems to covert time variables into rather high values… so may be it could work if the format is adjusted?

            Thanks for everything!



            Comment


            • #7
              Sorry I forgot to say that I tried exactly what you proposed (leave out time and run the regression again) and then I got results for F and R² adj. That's why I originally thought that Time might be the problem But I cannot just leave the variable out because it is crucial to my analysis...

              Comment


              • #8
                In case it is needed: Here's the output for the robust regression without the time variable:

                Code:
                Linear regression                               Number of obs     =      1,910
                                                                F(20, 1889)       =       4.11
                                                                Prob > F          =     0.0000
                                                                R-squared         =     0.0202
                                                                Root MSE          =     .22197
                
                -------------------------------------------------------------------------------------
                                    |               Robust
                         CAR_gesamt |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                --------------------+----------------------------------------------------------------
                    Regelpublizität |   .0346615    .009821     3.53   0.000     .0154003    .0539226
                         Dividenden |   .0355877   .0118186     3.01   0.003     .0124089    .0587665
                     Aktienrückkauf |    .041782   .0096126     4.35   0.000     .0229295    .0606345
                            Anleihe |   .0343009   .0280414     1.22   0.221    -.0206945    .0892963
                    Kapitalerhöhung |    .018033   .0135665     1.33   0.184    -.0085739    .0446399
                                 MA |   .0480606   .0121178     3.97   0.000     .0242949    .0718263
                        Kooperation |   .1035219   .0270019     3.83   0.000     .0505652    .1564786
                        Beteiligung |   .0744821   .0143985     5.17   0.000     .0462436    .1027207
                            Verkauf |   .0479677   .0281469     1.70   0.089    -.0072345      .10317
                Personalveränderung |   .0155206   .0125071     1.24   0.215    -.0090085    .0400497
                        Rechtssache |   .0090357   .0209919     0.43   0.667     -.032134    .0502054
                          Strategie |   .0370767   .0578729     0.64   0.522    -.0764248    .1505781
                    Auftragseingang |   .0855951   .0206544     4.14   0.000     .0450872    .1261029
                          Insolvenz |   .0939014   .1720241     0.55   0.585    -.2434759    .4312786
                          Sonstiges |   -.006833   .0209348    -0.33   0.744    -.0478908    .0342249
                        MarketCapln |   .0151355   .0123817     1.22   0.222    -.0091477    .0394187
                      TotalAssetsln |   -.009038    .008723    -1.04   0.300    -.0261459    .0080698
                    GeneralStandard |    .014412   .0149802     0.96   0.336    -.0149674    .0437915
                              Scale |   .0246499    .016006     1.54   0.124    -.0067414    .0560412
                     ReturnonAssets |  -.0006537     .00068    -0.96   0.337    -.0019874      .00068
                              _cons |  -.1157676   .0619208    -1.87   0.062     -.237208    .0056728
                -------------------------------------------------------------------------------------
                
                .

                Comment


                • #9
                  your time variable is very strange; first, note that there is very little variation; second, note the large jump between the 3rd largest and the 2nd largest values; finally, recall that this measures millisecpnds since 1/1/1960 - I think that there is something seriously wrong with this variable - maybe you could explain more about what it should be and why there is so little variation (and, of course, how you got it into this format - i.e., what commands did you use?)

                  Comment


                  • #10
                    Yes, you are right, indeed. I have to admit that I did the data recollection in Exel, so I basically just typed in 15:02:00 for example. Later on I imported it into Stata and I did not change the format because "HH:MM:SS" looked quite plausible to me.

                    What's really strange is that if I type in -br- I see the time in the format I expect it to be, but if I generate a -dataex- example only really high values appear.

                    Below you can see, for example three ad hoc messages of the company 1&1 Drillisch that were published at different times:

                    Code:
                    * Example generated by -dataex-. To install: ssc install dataex
                    clear
                    input int(DisclosureID Day) double Zeit str36 CompanyName
                     911 101      -1893378780000 "1&1 DRILLISCH"
                     911 102      -1893378780000 "1&1 DRILLISCH"
                     911 103      -1893378780000 "1&1 DRILLISCH"
                     911 104      -1893378780000 "1&1 DRILLISCH"
                     911 105      -1893378780000 "1&1 DRILLISCH"
                     911 106      -1893378780000 "1&1 DRILLISCH"
                     911 107      -1893378780000 "1&1 DRILLISCH"
                     911 108      -1893378780000 "1&1 DRILLISCH"
                     911 109      -1893378780000 "1&1 DRILLISCH"
                     911 110      -1893378780000 "1&1 DRILLISCH"
                     911 111      -1893378780000 "1&1 DRILLISCH"
                    2345 101      -1893410520000 "1&1 DRILLISCH"
                    2345 102      -1893410520000 "1&1 DRILLISCH"
                    2345 103      -1893410520000 "1&1 DRILLISCH"
                    2345 104      -1893410520000 "1&1 DRILLISCH"
                    2345 105      -1893410520000 "1&1 DRILLISCH"
                    2345 106      -1893410520000 "1&1 DRILLISCH"
                    2345 107      -1893410520000 "1&1 DRILLISCH"
                    2345 108      -1893410520000 "1&1 DRILLISCH"
                    2345 109      -1893410520000 "1&1 DRILLISCH"
                    2345 110      -1893410520000 "1&1 DRILLISCH"
                    2345 111      -1893410520000 "1&1 DRILLISCH"
                    2798 101 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 102 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 103 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 104 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 105 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 106 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 107 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 108 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 109 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 110 -1893438300000.0002 "1&1 DRILLISCH"
                    2798 111 -1893438300000.0002 "1&1 DRILLISCH"
                    end
                    format %tcHH:MM:SS Zeit

                    And here you can see a screenshot of my data editor:

                    Click image for larger version

Name:	scrren.PNG
Views:	1
Size:	39.5 KB
ID:	1474918



                    So I don't really understand why the descriptive variables show such low standard deviations…
                    How do you see that it measures miliseconds since 1960? The thing is that it should not have anything to do with a date but only with the time the ad hoc message was published...

                    Do you have an idea what the appropiate time variable format should be so that it is usable in a regression?

                    Comment


                    • #11
                      First of all, some substantive advice, as opposed to advice on using Statalist.

                      Stata's "date and time" variables are complicated and there is a lot to learn. If you have not already read the very detailed Chapter 24 (Working with dates and times) of the Stata User's Guide PDF, do so now. If you have, it's time for a refresher. After that, the help datetime documentation will usually be enough to point the way. You can't remember everything; even the most experienced users end up referring to the help datetime documentation or back to the manual for details. But at least you will get a good understanding of the basics and the underlying principles. An investment of time that will be amply repaid.

                      All Stata manuals are included as PDFs in the Stata installation (since version 11) and are accessible from within Stata - for example, through the PDF Documentation section of Stata's Help menu.

                      Added in edit: this was being written while post #10 was posted. You definitely need to do the reading.

                      You seem to suggest that your time data was imported from Excel. Suppose you issue the command
                      Code:
                      format Zeit %tc
                      browse Zeit
                      what sorts of dates and times do you see? I may be wrong, but I don't think they're what you think they should be. Values on the order of -1.89e+12 correspond to a lot of milliseconds before January 1 1960.
                      Code:
                      . display %tc -1.89e12
                      09feb1900 00:00:00
                      I think that however you got your data in from Excel (did you use Stata's import excel command?) your date was not imported correctly. If that's the case, we'll have to figure out what to correct once we know what you did that failed. There's a FAQ somewhere on this, and other advice, but I can't quickly locate it.

                      But more to the point, do you really believe that time makes a linear contribution to CAR? I don't think so, because you say that you tried to use dummy variables for certain time periods but ran into trouble. You were on the right track there, you are (almost certainly) on the wrong track trying to use time - either as it is, or re-expressed as a date or year - as a linear term in your model. Multicollinearity is not a problem with dummy variables if you do them correctly.

                      So your work is cut out for you.
                      1. Read about dates and times in Stata
                      2. Decide if your times are correct in Stata
                      3. If not, they need to be corrected
                      4. Figure out how to create and incorporate indicator variables for time periods in your regressions
                      With regard to #4, your approach should be to create a categorical variable that indicates different time periods, e.g 1 for 2000 and before, 2 for 2000-2008, 3 for 2009 onward, and then use Stata's factor variable notation to include indicator variables in your regressions. For that, you will want to review the output of help factor variables for instruction in that technique.
                      Last edited by William Lisowski; 14 Dec 2018, 09:50.

                      Comment


                      • #12
                        Thanks a lot for your advice, I really appreciate it! I'll definitely do the reading! Having read the information on -help datetime- just makes me wonder if it implies that time is always linked to a date? That is not really what I want. I only want to refer to certain time periods like for example 9:00-17:00pm, 17:01-22:00pm, 22:01-7:00am and 7:01-8:59am, independent of the date the ad hoc message was published. Previous studies, for example, have come to the conclusion, that if ad hoc messages are not published during trading hours the overall reaction is lower on the actual event day in comparison to messages published during trading hours (something I could confirm via univariate analysis as well). So I actually need to somehow include time variables in my regression model, testing for interactions with other relevant variables... Well, if I still can make out how it works I guess creating factor variables is a good idea- I have done that before, this shouldn't be a problem.

                        Comment

                        Working...
                        X