Announcement

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

  • Country and Industry Fixed Effects

    Dear all
    I'm running a panel data regression, with 7 independent variables and 1756 firms over 4 years. I have 5,920 observations. I created the panel typing: xtset Firms Year
    The (preliminary) results are consistent with the literature but I want to include fixed effects (after an Hausman test) . Particularly, I have two additional variables (not included before) containing respectively industry and countries of each firm, and I would include Industry and Country Fixed Effects. Country fixed effects should capture systematic differences in the financial environment across countries (such as bankruptcy laws) while industry fixed effects (controlling for manufacturing, commerce, and retail firms) control for systematic differences in risk & performance across sector types.
    My problem is about how to add Industry and Country Fixed Effects to the baseline regression.

    I typed the following lines of command where I correct st. err. for heteroskedasticity:

    egen country_industry=group(Country Industry)
    xtreg DepVar Var1 Var2 Var3 Var4 Var5 Var6 Var7, i(country_industry)fe robust

    The results are very interesting, but I was wondering whether my commands are correct (my inexperience leads me to be cautious). Have anyone suggestion?

    Thanks in advance

  • #2
    create two sets of dummy variables based on your country and industry variables, Industry1,Industry2...and Country1,Country2,..., these dummies receive one for observations corresponding to them and zero for all other observations, then include Industry* and Country* in your specification. If you have already put your data into correct long format and have set your time and panel variables, everything is going to be smooth
    Last edited by NimaDarbari; 17 Feb 2015, 10:08.

    Comment


    • #3
      Hello, Nima,

      I agree with you: we have to be "cautious" when dealing with panel data analysis.

      IMHO, the main issue concerning panel data models is, well, modeling. You said you want to include fixed-effects after (or in spite of?) the Hausman test. Also, you decided to include two new variables in the model. If I understood correctly, a good approach would be, first, including the variables you think are "reasonable" to provide answers to your question; then, checking if you need to apply a fixed or a random-effects model; finally, perform the postestimations and reflect on the results. Oftentimes you may want to start over and over, providing slight improvements to your model.

      Concerning the "correct" commands (as well as rather useful examples), if you didnt check this text yet, I believe it will put you on the right track: http://www.stata.com/manuals13/xtxtreg.pdf

      Hopefully it helps.

      Best,

      Marcos
      Best regards,

      Marcos

      Comment


      • #4
        Thanks for your very precious suggestions. Let me show to you what i did.

        A) panel data has a correct form (xtset Firm Year)

        B) I ran my baseline panel data regression without country and industry variables:
        xtreg DepVar Var1 Var2 Var3 Var4 Var5 Var6 Var7, robust [1]

        C) I ran (postestimation) an hausman test says to me that random effects are inconsistent. I ran the Hausman test with regard the specification [1]. Thus, i do not include country and industry dummies in the test as they should be omitted by the model with fixed effects (since they are time-invariant variables).

        D) Some reasons, in my opinion very important , lead to add to [1] industry and country fixed effects. I included them with the following form:
        egen country_industry=group(Country Industry)
        xtreg DepVar Var1 Var2 Var3 Var4 Var5 Var6 Var7, i(country_industry)fe robust

        E) after suggestion received i run also the following regression:
        xtreg DepVar Var1 Var2 Var3 Var4 Var5 Var6 Var7 i.country i.industry, robust [2]

        The results of models [1] and [2] are substantially the same. My question now is which of them is the correct form of a regression with Industry and Country Fixed Effects?

        Thanks in advance.

        Anne Marie Blanc


        Comment


        • #5
          Anne Marie:
          I would second:
          Code:
          xtreg DepVar Var1 Var2 Var3 Var4 Var5 Var6 Var7 i.country i.industry, fe robust [Firm]
          .

          since the effects of country and industry are disentagled.
          However, you would be better off posting not only what you typed, but also what Stata gave you back (as per FAQ).
          As an aside, I fail to get why you did not perform the -hausman- test with i.country and i.industry.
          The inclusion of i.country and i.industry in -fe- and -re- wouldn't have caused any problem, since -hausman- test focuses on the subset of parameters which are common to both -fe- and -re- specification.
          Kind regards,
          Carlo
          (StataNow 19.0)

          Comment


          • #6
            Carlo: Adding i.country and i.industry to a fixed-effects regression does not make sense because all those dummy variables are time-invariant and thus wiped out by the fixed-effects transformation. They are not identified.
            https://www.kripfganz.de/stata/

            Comment


            • #7
              Sebastian:
              i agree, but my point was that -hausman- wouldn't have suffered for their inclusion, as they're actually wiped out by under the -fe-specification.
              At the top of that, if they're actually wiped out under the -fe- specification, I fail to get the substantive issue made by Anne Marie about including them, set aside her perfectly legal opinion.
              Kind regards,
              Carlo
              (StataNow 19.0)

              Comment


              • #8
                Carlo, thanks a lot, and my apologies to all if i did not followed FAQ exactly.

                I now perform HAUSMAN test including i.country and i.industry after your precious suggestion. The results are absolutely the same: random effects are strongly inconsistent. Now, i turn about my central question (that was not about HAUSMAN test), i.e. which is the most appropriate form of panel data regression with industry and country effects.

                I Have two alternative choices :


                xtreg DepVar Var1 Var2 Var3 Var4 Var5 Var6 Var7, i(country_industry)fe robust [1]

                or


                egen country_industry=group(Country Industry)
                xtreg DepVar Var1 Var2 Var3 Var4 Var5 Var6 Var7 i.country i.industry, robust [2]

                Please, note that in [2] i did not add the option "fe" (as country and industry are time-invariant).


                As reported before, the results are substiantally the same; sometime coefficients value differ only at fourth decimal places, while sign and statistical significance are constant.

                I trying to understand which of them are more appropriate form of Industry and Country. Probably, there is a third and most appropriate form.


                Thanks to all.





                Comment


                • #9
                  Anne Marie:
                  thanks a lot for providing more details.
                  My takes, ranked in personal preference order (you and anyone else on the list might obviously diasagree) are as follows:
                  - first option: follow Hausman's test guidance and perform -xtreg, fe- without i. country and i.industry;
                  - second option: perform xtreg DepVar Var1 Var2 Var3 Var4 Var5 Var6 Var7, i(country_industry)fe robust [1]. The drawback here seems more methodological than computational, in that you grouped two variables that, taken separately, were wiped out by -fe- machinery;
                  - third option: be econometrically anarchist, forget Hausman's guidance and present both Models [1] and [2], explaining the reason of your choice.
                  Kind regards,
                  Carlo
                  (StataNow 19.0)

                  Comment


                  • #10
                    Anne Marie: Which version of Stata are you using? In the latest versions, although the option i() is still working to set the panel identifier it is neither required nor advised to specify it with xtreg. Use xtset instead to declare your panel (and time) identifier variables. Also note that vce(robust) replaces robust in the command syntax nowadays.

                    The problem with your syntax [1] then is that the option i() changes your panel identifier to be the country_industry group variable, and no longer the firm identifier. That means that you do not have firm fixed effects any more in the model which is most likely not what you want to do.

                    Another question is if you want to have fixed effects for country-industry pairs (what you obtain by grouping Country and Industry), or separate fixed effects for countries and industries as in syntax [2]. In this latter syntax, you are essentially specifying a model with country- and industry-specific fixed effects but firm-specific random effects (if your panel identifier is still set to be the firm identifer, which would not be the case any more if you change it a couple of lines before in the code by using the i() option.)

                    Thus, you have to be very careful with the i() option because it also affects subsequent estimations. Better do not use it at all.

                    A meaningful analysis might involve (leaving aside the Hausman test):
                    Code:
                    xtset Firm Year
                    egen country_industry = group(Country Industry)
                    
                    xtreg DepVar Var1-Var7, fe vce(robust)
                    xtreg DepVar Var1-Var7 i.country_industry, re vce(robust)
                    xtreg DepVar Var1-Var7 i.Country i.Industry, re vce(robust)
                    You may also want to include time effects i.Year in all specifications.
                    https://www.kripfganz.de/stata/

                    Comment


                    • #11
                      Dear all,

                      I have also a panel data (12 years, 9 countries). I use the same commands, but in all cases my results are not singnificant and not consistent with the literature. Also Hausman test does not work after robust cluster options? Does it mean that I have to run FE or RE without robust and after the suggestion of Hausman test include robust option. Because my data has both heteroskedasticity and serial correlation.And I dont know how to solve these problems.
                      Thanks a lot! I posted the same question in another discussion group, but did not receive any answer yet: http://www.statalist.org/forums/foru...-effects-model

                      Kenulina
                      Last edited by Kenulina Schneider; 26 Feb 2015, 15:54.

                      Comment


                      • #12
                        Kenulina:
                        in order to get things run smoother, it's better to start a new thread instead of appending a new query to an existing one.
                        Please, find a reply to your post at: http://www.statalist.org/forums/foru...-effects-model.
                        As an aside, if you suspect that your post has been overlooked, please consider if you can post it more effectively (there's an FAQ on this topic).
                        Kind regards,
                        Carlo
                        (StataNow 19.0)

                        Comment


                        • #13
                          Hi All,

                          I have two questions for my understanding.
                          xtreg DepVar Var1-Var7, fe vce(robust) Initially if we set a panel it has to be company ID and year so xtset id year we created panel when we write above equation how would stata know whether it's fixed effect with respect to firm or year? Secondly, instead of firm fixed effects we need industry fixed effects so we still create a panel with firm id and year. Only difference is we add dummies for industries, Am i right?
                          xtreg DepVar Var1-Var7 i.country_industry, re vce(robust) in this equation is it fixed effects of firm or industry, please help me in that !

                          Comment


                          • #14
                            Originally posted by Sebastian Kripfganz View Post
                            Anne Marie: Which version of Stata are you using? In the latest versions, although the option i() is still working to set the panel identifier it is neither required nor advised to specify it with xtreg. Use xtset instead to declare your panel (and time) identifier variables. Also note that vce(robust) replaces robust in the command syntax nowadays.

                            The problem with your syntax [1] then is that the option i() changes your panel identifier to be the country_industry group variable, and no longer the firm identifier. That means that you do not have firm fixed effects any more in the model which is most likely not what you want to do.

                            Another question is if you want to have fixed effects for country-industry pairs (what you obtain by grouping Country and Industry), or separate fixed effects for countries and industries as in syntax [2]. In this latter syntax, you are essentially specifying a model with country- and industry-specific fixed effects but firm-specific random effects (if your panel identifier is still set to be the firm identifer, which would not be the case any more if you change it a couple of lines before in the code by using the i() option.)

                            Thus, you have to be very careful with the i() option because it also affects subsequent estimations. Better do not use it at all.

                            A meaningful analysis might involve (leaving aside the Hausman test):
                            Code:
                            xtset Firm Year
                            egen country_industry = group(Country Industry)
                            
                            xtreg DepVar Var1-Var7, fe vce(robust)
                            xtreg DepVar Var1-Var7 i.country_industry, re vce(robust)
                            xtreg DepVar Var1-Var7 i.Country i.Industry, re vce(robust)
                            You may also want to include time effects i.Year in all specifications.
                            Dear Sebastian, I have similar problem as Anne Marie, except I do not want to control for country, but just industry, everything else seems to be the same.

                            xtreg xvar yvar i.Industry, re vce(robust) also seems the most logical choice in my analysis, however, the results is that the test statistics, WaldChi2 available, are missing. About this problem, STATA help says " The VCE you have just estimated is not of sufficient rank to perform the model test. As discussed in [R] test, the model test with clustered or survey data is distributed as F(k,d-k+1) or chi2(k), where k is the number of constraints and d=number of clusters or d=number of PSUs minus the number of strata. Because the rank of the VCE is at most d and the model test reserves 1 degree of freedom for the constant, at most d-1 constraints can be tested, so k must be less than d. The model that you just fit does not meet this requirement." (although honestly I dont understand all of it).

                            Do you know what I could do to help with this problem? Thanks in advance!

                            Comment

                            Working...
                            X