Announcement

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

  • How could I understand the command "xtgls" in the Stata

    Hi,I have a question on "xtgls". I know "xtgls" is fit the panel data model using GLS method.
    My question is that whether this model is fixed effect model or random effect model? or this
    method is not make a distinction between fe model and re model?

    I have a panel data and choose fe and re using hausman test, the result indicates that the re model
    is good. Howerer, the model residual exist serial correlation and heteroskedasticity. Can I use xtgls to
    fit this model?

    Thanks very much for any suggestions.

    Best regards,
    wanhaiyou

  • #2
    Wanhaiyou:
    let's make a step backwards.
    -xtgls- was conceived for dealing with small N, large T panel datasets. Hence, if your dataset is a large N, small T one, you should stick with -xtreg, re-.
    If you suspect serial correlation and heteroskedasticity, just add -vce(robust)- option.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thanks very much, Carlo. I want to know that xtreg,re with vec(robust) can handle with both serial correlation and heteroskedasticity?

      I know that we can use xtpcse or xtscc to handle with both serial correlation and heteroskedasticity, but I am not sure these two routines
      are fixed or random effect model.

      Thanks for your help!

      Best regards,
      wanhaiyou

      Comment


      • #4
        Originally posted by Carlo Lazzaro View Post
        Wanhaiyou:
        let's make a step backwards.
        -xtgls- was conceived for dealing with small N, large T panel datasets. Hence, if your dataset is a large N, small T one, you should stick with -xtreg, re-.
        If you suspect serial correlation and heteroskedasticity, just add -vce(robust)- option.
        Hi Carlo
        Another important question is that whether this model (fitted by xtgls or xtpcse)is fixed effect model or random effect model?
        I can not understand.

        Thanks
        Best regards,
        wanhaiyou

        Comment


        • #5
          wanhaiyou:
          they basically estimate -fe- models, as you may read from this enligthening article :http://www.stata-journal.com/sjpdf.h...iclenum=st0084
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Originally posted by Carlo Lazzaro View Post
            wanhaiyou:
            they basically estimate -fe- models, as you may read from this enligthening article :http://www.stata-journal.com/sjpdf.h...iclenum=st0084
            Thanks very much for your help,Carlo. I will read the literature seriously.

            Best regards,
            wanhaiyou

            Comment


            • #7
              Originally posted by Carlo Lazzaro View Post
              Wanhaiyou:
              let's make a step backwards.
              -xtgls- was conceived for dealing with small N, large T panel datasets. Hence, if your dataset is a large N, small T one, you should stick with -xtreg, re-.
              If you suspect serial correlation and heteroskedasticity, just add -vce(robust)- option.
              Dear Carlo,

              In addition to the article provided in this discussion, are there any other articles for referencing particularly on the T>N dataset requirement for xtgls,

              Regards,
              Grace

              Comment


              • #8
                Grace.
                welcome to this forum.
                From the reference section of -xtgls- entry in Stata .pdf manual, you can find, among Others, the following textbook on econometrics:

                Davidson, R., and J. G. MacKinnon. 1993. Estimation and Inference in Econometrics. New York: Oxford University Press.

                Greene, W. H. 2012. Econometric Analysis. 7th ed. Upper Saddle River, NJ: Prentice Hall.

                Greene, W. H. 2018. Econometric Analysis. 8th ed. New York: Pearson.

                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Dear Carlo, thanks a lot for the information

                  Comment


                  • #10
                    Grace:
                    see also https://www.stata.com/bookstore/micr...metrics-stata/, pages 274-276.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      Originally posted by Carlo Lazzaro View Post
                      wanhaiyou:
                      they basically estimate -fe- models, as you may read from this enligthening article :http://www.stata-journal.com/sjpdf.h...iclenum=st0084
                      Dear Carlo,
                      I feel that your answer may be misleading.
                      According to the STATA manual.pdf (and also in the article you linked), the xtgls command is based on pooled ols, and to obtain an estimate of fe, one needs to add dummy variables that identify panels.
                      Therefore, to obtain FE estimates for the coefficients of the model with the regression equation:
                      y_it = x_it*b + u_i + e_it
                      The STATA command used is:
                      xtgls y x i.id
                      Where id is the panel variable.

                      Comment


                      • #12
                        Manh:
                        it may be.
                        But see 4 Estimation and testing of fixed-effect panel-data systems in https://www.stata-journal.com/sjpdf....iclenum=st0084
                        Kind regards,
                        Carlo
                        (Stata 19.0)

                        Comment

                        Working...
                        X