Announcement

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

  • Fixed effects with xtgls command

    Hello,

    After Hausman test when I run fixed effects model, I have autocorrelation, heteroscedasticity, and cross-sectional dependency problems in the panel. I know that I can deal with heteroscedasticity and autocorrelation problems using xtreg, "depvar" "varlist", fe vce(robust).

    I've also checked Driscol Kraay. It's known that I have to use FGLS method with xtgls STATA command. I've used the following command:

    xtgls "depvar" "varlist", panels(hetero) corr(psar1) force

    Is that enough to use the command above to remove autocorrelation, heteroscedasticity, and cross-sectional dependency problems simultaneously? if not how can I solve this problem?

    I'll be glad if you can help.

    Best,

  • #2
    Tufan Tufan (are those your real given and family names?):
    welcome to the list.
    I woud take a step aside: you cannot test -fe- vs -re- specification via -hausman- with default standard errors and then impose -robust- or -cluster- option.
    You should compare these specifications with robustified/clustered standard errors via the user-written command -xtoverid- (type -search xtoverid- from within Stata to install it).
    As a sidelight, please note that -xtoveri- does not support the -fvvarlist- notation.
    hence, if you have factor variables, you have to rely on the old-fashioned -xi- prefix.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Tufan Tufan (are those your real given and family names?):
      welcome to the list.
      I woud take a step aside: you cannot test -fe- vs -re- specification via -hausman- with default standard errors and then impose -robust- or -cluster- option.
      You should compare these specifications with robustified/clustered standard errors via the user-written command -xtoverid- (type -search xtoverid- from within Stata to install it).
      As a sidelight, please note that -xtoveri- does not support the -fvvarlist- notation.
      hence, if you have factor variables, you have to rely on the old-fashioned -xi- prefix.
      Dear Carlo,

      Thank you very much for your quick reply. It is very helpful. I tested fe&re using xtoverid robust instead of hausman. The results gave fixed effect. But I'm confused about autocorrelation, heteroscedasticity, and cross-sectional problems are removed right now or should I still apply any other step(s)? For instance, should I continue with Driscol Kraay (xtgls "depvar" "varlist", panels(hetero) corr(psar1) force) after xtroverid or it is not necessary? Thanks.

      Kind regards,

      P.S: Yes, they are my real names.

      Comment


      • #4
        Tufan:
        you should keep the same specification.
        As far as panel data analysis is concerned, -xtoverid- is a wonderful user-written resource whenever we cannot rely on -hausman- (that allows default standard errors only).
        That said, if you have a large N, small T panel dataset, you can go -xtreg,fe- with robustified/clustered standard errors, that accomodate for both heteroskedasticity and autocorrelation.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Dear Carlo,

          Thank you so much for your beneficial help.

          Yes, I have got a dataset with large N and small T. In this case, I can just correct both heteroskedasticity and autocorrelation using -xtreg, fe with robust option- as mentioned in previous posts. But then I still keep cross-sectional dependency problem. My aim is to remove all these three problems (i.e. hetero-, autocor-, cross secti-) at once. If three of them cannot be removed at once, I will go on with your suggestion by removing merely two of them (i.e. hetero- and autocor).

          Kind regards,

          Tufan

          Comment


          • #6
            Tufan:
            as per examples reported in -xtgls- entry, Stata .pdf manual, it would seem that -xtgls- is conceived for small N, large T panel datasets (see also: https://www.stata.com/bookstore/micr...etrics-stata/: page 271-275)...
            Other sources (http://www.econ.cam.ac.uk/CSDPDM/index.html) seem to consider serial correlation dependence worth paying attention for large N, large T panel datasets
            Kind regards,
            Carlo
            (Stata 18.0 SE)

            Comment


            • #7
              Dear Carlo,

              I have another question. In my model, I have time-invariant dummy variables and when I use "xtreg, fe vce(robust)" command it omits the dummy variables. But I want the dummy variables not to be omitted. According to forum posts, xthtaylor command helps to deal with my problem. Is that ok or do you have any other suggestion? Thanks.

              Kind regards,

              Tufan

              Comment


              • #8
                Tufan:
                see also -help mundlak-.
                Kind regards,
                Carlo
                (Stata 18.0 SE)

                Comment


                • #9
                  you can also use pcse estimation (Prais-Winsten regression) with - xtpcse varlist,corr(ar1) - : if common AR(1) , or - xtpcse varlist,corr(psar1) - : if panel-specific AR(1)

                  Comment


                  • #10
                    Dears,

                    Let me take advantage of the topic for a similar question.

                    I'm running a panel data with N=13 (countries) and T=14 (years). Hausman test indicate fixed effects. testparm indicate time fixed-effect is needed. I also have autocorrelation, heteroscedasticity, and cross-sectional dependency problems in the panel, but according Baltagi cross-sectional dependence is a problem in macro panels with long time series (over 20-30 years). I have macro panel, but with no long time series (over 20-30 years).

                    In this case, I should I ignore the cross-sectional dependence and go with -xtreg,fe with robustified/clustered standard errors? Or should I go with xtgls or xtpcse?

                    Comment


                    • #11
                      Gulherme;
                      welocme to this forum.
                      It's aborderline situation, but, due to cross-sectional dependence, I would go -xtpcse-.
                      Kind regards,
                      Carlo
                      (Stata 18.0 SE)

                      Comment


                      • #12
                        Mr. Carlo,

                        Thank you so much!

                        Comment


                        • #13
                          Mr. Carlo,

                          One more question: What if the hausman test has indicated randon effect? xtpcse would be appropriate in this case?

                          Thank you for your kind attention,
                          Guilherme

                          Comment


                          • #14
                            Hi. I want to jump in. If the Hausman test indicates the FE model is used, and after testing for hetero, auto, and cross sectional dependence all 3 are there. Can I use xtgls dep indep, panels(hetero) corr(ar1)? Provided I have a long panel. My T is greater than N?

                            Comment


                            • #15
                              Hi.I am dealing with a dataset having long T and small N.I have a question can we add time and provincial dummies to xtgls?If yes how can we add in stata.Like adding i.year and i.province or we need to include only i.year and the xt will control province fixed effect?

                              Comment

                              Working...
                              X