Announcement

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

  • Interpretation of constant in xtreg

    Hello everyone!

    I am currently writing my master thesis, where I analyze the effect of hurricanes on the stock market. I have an unbalanced panel dataset with stock returns over several days prior to and after each hurricane over a time frame of several years. I created a dummy variable "hurricane" taking the value 1 if the stock is affected that day by a hurricane, 0 otherwise. I included time-fixed as well as firm-fixed effects and clustered the standard error on firm-level. I have run the following regression as a baseline model:

    xtreg RET i.hurricane i.date, fe vce(cluster PERMNO)

    The regression output shows the coefficient for the hurricane dummy variable, many coefficients for all the days (which I know I don't have to look at further) and the constant.

    Question:
    Does the constant reflect the intercept (if the hurricane dummy is 0)? If so, I understand that in order to retrieve the effect if the stock is affected by the hurricane (dummy = 1), by adding the constant to the coefficient for hurricane dummy.

    I am confused, as I have read, that I cannot interpret the constant in the fixed effects model (https://www.stata.com/support/faqs/s...effects-model/)

    I would very much appreciate it if someone could help!!

  • #2
    Jojo:
    in -xtreg,fe- each panel has its in intercept:
    In the following toy-example (really simplifies vs what should be done to be concistent with the recommended methodology), -regress- and -xtreg,fe- give back the same predicted value for _n==1:
    Code:
    use "https://www.stata-press.com/data/r17/nlswork.dta"
    . reg ln_wage age i.idcode  if idcode<=2
    
          Source |       SS           df       MS      Number of obs   =        24
    -------------+----------------------------------   F(2, 21)        =     22.23
           Model |  2.97534125         2  1.48767063   Prob > F        =    0.0000
        Residual |  1.40565657        21  .066936027   R-squared       =    0.6791
    -------------+----------------------------------   Adj R-squared   =    0.6486
           Total |  4.38099782        23  .190478166   Root MSE        =    .25872
    
    ------------------------------------------------------------------------------
         ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |   .0510045    .008836     5.77   0.000      .032629    .0693799
        2.idcode |  -.4033833   .1059909    -3.81   0.001    -.6238036   -.1829631
           _cons |   .6973154   .2443736     2.85   0.010     .1891127    1.205518
    ------------------------------------------------------------------------------
    
    . predict fitted, xb
    (24 missing values generated)
    
    . xtreg ln_wage age  if idcode<=2, fe
    
    Fixed-effects (within) regression               Number of obs     =         24
    Group variable: idcode                          Number of groups  =          2
    
    R-squared:                                      Obs per group:
         Within  = 0.6134                                         min =         12
         Between = 1.0000                                         avg =       12.0
         Overall = 0.4578                                         max =         12
    
                                                    F(1,21)           =      33.32
    corr(u_i, Xb) = -0.0834                         Prob > F          =     0.0000
    
    ------------------------------------------------------------------------------
         ln_wage | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             age |   .0510045    .008836     5.77   0.000      .032629    .0693799
           _cons |   .4956238   .2429093     2.04   0.054    -.0095338    1.000781
    -------------+----------------------------------------------------------------
         sigma_u |  .28523509
         sigma_e |  .25871998
             rho |  .54862949   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(1, 21) = 14.48                      Prob > F = 0.0010
    
    . predict fitted_fe, xb
    (24 missing values generated)
    
    . predict u_fe, u
    (28,510 missing values generated)
    
    . list ln_wage age fitted fitted_fe u_fe if idcode==1
    
           +-------------------------------------------------+
           |  ln_wage   age     fitted   fitted~e       u_fe |
           |-------------------------------------------------|
        1. | 1.451214    18   1.615396   1.413705   .2016917 |
        2. |  1.02862    19   1.666401   1.464709   .2016917 |
        3. | 1.589977    20   1.717405   1.515713   .2016917 |
        4. | 1.780273    21    1.76841   1.566718   .2016917 |
        5. | 1.777012    23   1.870419   1.668727   .2016917 |
           |-------------------------------------------------|
        6. | 1.778681    25   1.972427   1.770736   .2016917 |
        7. | 2.493976    26   2.023432    1.82174   .2016917 |
        8. | 2.551715    28   2.125441   1.923749   .2016917 |
        9. | 2.420261    31   2.278455   2.076763   .2016917 |
       10. | 2.614172    33   2.380463   2.178772   .2016917 |
           |-------------------------------------------------|
       11. | 2.536374    35   2.482472   2.280781   .2016917 |
       12. | 2.462927    37   2.584481    2.38279   .2016917 |
           +-------------------------------------------------+
    *Calculating predicted values for _n==1 after -regress-
    . di .6973154+(.0510045*18)
    1.6153964
    *Calculating predicted values for _n==1 after -xtreg-
    . di .4956238+(.0510045*18)+.2016917
    1.6153965
    
    .
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thank you very much for your quick response Carlo! Do I need to predict the values or is it sufficient enough to just mention the coefficient in the regression and its significance? e.g. in the example, you provided the coefficient for age and the significance level of 1%. I haven't worked with the predict command before and am unsure what to do and if I need to change the results. Many many thanks! Happy NYE!

      Comment


      • #4
        For what it's worth, the constant is basically meaningless for any real analysis, since all your x's will never all equal 0.

        Comment


        • #5
          Thank you for your reply Jared! In my case: If the coefficient for the hurricane dummy is -0.002 could I interpret this like the following: firms that are affected by hurricanes (change in dummy from 0 to 1) have a return of -0.2% less compared to the ones who are unaffected? And just ignore the constant, as it is meaningless?

          Comment


          • #6
            Jojo:
            predicting the values and recalculate them by hand using -xtreg,fe- outcome table and independent variables gives you a better command of what's going on.
            Th use of -predict- after -xtreg,fe- is well covered in the link you reported in your first post.
            I do reciprocate all the best for the New Year.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              Jojo Meier Yeah pretty much.

              The more pressing issue to me is your design. How are we conceptualizing hurricanes as affecting the stock market? I'm not an economist, so perhaps I'm way out of my depth, but hurricanes are events that only affect (usually) groups of states or related localities. However might a hurricane affect the performance of the stock market?

              I'm not saying it's impossible, I'm just curious how the design can be argued for.

              Comment


              • #8
                @Carlo, I will look into the link I've sent earlier and will try to figure it out, otherwise, I might come back with another question.

                @Jared, I have a database that lists all counties that were affected by hurricanes and the respective dates. I retrieved the firm locations for all traded stocks in the time frame and merged them with a mapping database that assigns county codes to all zip codes (HQ on zip code base). By doing that, I was able to determine if a stock was affected by a hurricane on a particular day.


                Thank you both very much!!

                Comment


                • #9
                  Originally posted by Jared Greathouse View Post
                  However might a hurricane affect the performance of the stock market?

                  I'm not saying it's impossible, I'm just curious how the design can be argued for.
                  I can think of plenty of direct and indirect effects of hurricanes on the stock market and examples are not hard to come by. When Harvey hit Texas in 2017, gasoline prices hit two-year highs as it forced refineries to close down (see https://www.cnbc.com/2017/08/27/us-g...efineries.html). This had a direct negative effect on the profitability of the oil distribution firms and indirect negative effects on the economy as a whole; e.g., it costs more to transport goods, individuals have reduced disposable incomes as they spend more on fueling their cars, etc. These negative effects are transmitted to the stock market. In addition, part of the damage caused by hurricanes has to be covered by insurance companies. If the damage is greater than anticipated, this will result in losses for the insurers, causing a decline in their market capitalization and thus impacting the aggregate stock market index.

                  @OP, as others have stated, the displayed constant in xtreg specifying the -fe- option is meaningless, so do not attempt to interpret it (or even report it). In fact, this is a Stata FAQ. See https://www.stata.com/support/faqs/s...effects-model/

                  Comment


                  • #10
                    Thank you Andrew! Appreciate it! Hope you all had a wonderful NYE!

                    Comment


                    • #11
                      Andrew Musau Okay that makes sense. I never knew data even existed for the performance of stocks at the county or local level, but given that such data does exist, the theory behind it makes plenty of sense. There was an interesting paper I read about a similar concept not too long ago. I guess I wrongly thought about the stock market as this sort of nebulous, national entity, but since granular level data exist, the relationship is one quite worthy of study, in some instances.

                      Comment


                      • #12
                        Originally posted by Jared Greathouse View Post
                        Andrew Musau I never knew data even existed for the performance of stocks at the county or local level
                        Formal stock exchanges are centralized, and are usually located in large cities such as New York, Chicago and Philadelphia. There is no notion of a county or local stock exchange, although within a county or locality, you can have a stock dealer operating in an electronic platform such as Nasdaq. Money markets on the other hand may have a local presence, e.g., through issuance of bonds by cities and municipalities. However, it is possible to identify listed companies that have a direct exposure to a hurricane, as the OP is doing.
                        Last edited by Andrew Musau; 01 Jan 2022, 11:24.

                        Comment

                        Working...
                        X