Announcement

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

  • xtreg with three fixed effects

    Hi all,

    I am new to Stata. I am performing a regression with panel data. The panel contains data of >1 million firms in five different countries over 8 years. I want to test whether a company's profitability measures influence the chance of being a target in an acquisition strategy.

    The dependent variable is a dummy indicator with a value of 1 if the company has been a target in an acquisition strategy. I want to add country, year and industry fixed effects and I do this by adding i.COUNTRY, i.YEAR and clustering by industry. Countries are referred to by numbers 1 to 5 and years simply by 2008 to 2015. I added nonest to the regression formula because some firms change from 1 industry to another during the time period. When I run the regression, it states for countries 2,3 and 5: omitted. What is going wrong?

    The commands I use are as follows:
    xtset FIRM YEAR
    xtreg dummytarget independent variables (profitability measures) i.COUNTRY i.YEAR, fe vce (cluster INDUSTRY) nonest

    Your help is greatly appreciated.


  • #2
    My first guess would be that you only have 1 year for those counties. Is that possible? Have you checked whether for missingness? I nice thing to do might be running
    Code:
    tab COUNTRY if e(sample) == 1
    after your regression, which would show you how often each country appeared in the regression sample (since e(sample) restricts to those that were in the regression).

    In any case, you might consider reghdfe, which tends to be much more efficient. You would type
    Code:
    ssc install reghdfe
    to install it, and then run:
    Code:
    reghdfe dummytarget independent variables (profitability measures), absorb(COUNTRY YEAR FIRM) cluster(INDUSTRY)
    (without any need to xtset your data)
    Mitch Downey, Grad student, UCSD Economics

    Comment


    • #3
      Hi Mitch,

      Thanks for your quick reply. It is true that for some firms I only have one year-observations and for some I have more than only one year-observation.

      I have now done it like this: reghdfe dummytarget independent variables, absorb (COUNTRY YEAR INDUSTRY) vce(cluster INDUSTRY).
      Is it possible to absorb INDUSTRY but also cluster at the same time?
      When I run the regression I get the following note: "INDUSTRY = fixed effect nested within cluster; treated as redundant for DoF computation." What does this mean? I am confused about the following explanation: "If a fixed effect variable is also a cluster variable (or is nested within a cluster variable), we do not consider it when computing the absorbed degrees of freedom." http://scorreia.com/software/reghdfe/faq.html Does this mean it is not taken into account as a fixed effect?

      Kind regards,

      Iris

      Comment


      • #4
        Iris:
        if your -depvar- is a categorical one, why preferring -xtreg- vs -xtlogit-?;
        -countries might be omitted due to collinearity (however, if that were the case, Stata should have alerted you with an ad hoc message);
        As an aside, why not posting what you typed (exactly) what you typed and what Stata gave you back (via CODE delimiters) as requested by FAQ? Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Carlo,

          Thanks for your reply.
          To be honest, this is what my thesis supervisor told me and it is due to computation speed. Is there also something like reghdfe for xtlogit? Then I will try this as well.
          I am sorry I did not post as requested by FAQ. I will do that in the future.

          Kind regards,

          Iris

          Comment


          • #6
            Dear all,

            Here you can find the command I used:
            Code:
            reghdfe dummytarget independentvariable1 independentvariable2 independentvariable3, absorb (COUNTRY YEAR INDUSTRY) vce(cluster INDUSTRY)
            and this is the result:

            PHP Code:
            (converged in 8 iterations)
            HDFE Linear regression                            Number of obs   =  2,595,239
            Absorbing 3 HDFE groups                           F
            (   5,    153) =      10.14
            Statistics robust to heteroskedasticity           Prob 
            F        =     0.0000
                                                              R
            -squared       =     0.0012
                                                              Adj R
            -squared   =     0.0012
                                                              Within R
            -sq.    =     0.0002
            Number of clusters 
            (INDUSTRY) =        154        Root MSE        =     0.0103

                                                 
            (StdErradjusted for 154 clusters in INDUSTRY)
            --------------------------------------------------------------------------------------
                                 |               
            Robust
                     dummytarget 
            |      Coef.   StdErr.      t    P>|t|     [95ConfInterval]
            ---------------------+----------------------------------------------------------------
            independentvariable1 |   6.93e-06   6.44e-06     1.08   0.284    -5.80e-06    .0000197
            independentvariable2 
            |   .0000801   .0000194     4.14   0.000     .0000418    .0001184
            independentvariable3 
            |   .0000482   .0000102     4.70   0.000      .000028    .0000684
            independentvariable4 
            |   1.32e-06   3.21e-06     0.41   0.681    -5.01e-06    7.66e-06
            independentvariable5 
            |   .0000366   8.78e-06     4.17   0.000     .0000193     .000054
            --------------------------------------------------------------------------------------

            Absorbed degrees of freedom:
            -----------------------------------------------------------------------+
                     
            Absorbed FE |  NumCoefs.  =   Categories  -   Redundant     
            ---------------------+-------------------------------------------------|
                         
            COUNTRY |            5               5              0     
                            
            YEAR |            6               7              1     
                        
            INDUSTRY |            0             154            154 *   | 
            -----------------------------------------------------------------------+
            * = 
            fixed effect nested within clustertreated as redundant for DoF computation 
            What do the following things mean:
            - "(converged in 8 iterations)"
            - "fixed effect nested within cluster; treated as redundant for DoF computation"

            Kind regards,

            Iris

            Comment

            Working...
            X