Announcement

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

  • Random of Fixed Effects?

    I am currently writing a dissertation on the effect of foreign aid on the human development index.

    I am doing this via panel data - 46 countries between the years 2002 to 2017.

    I am using the command -xtreg- however I am unsure whether to use fixed or random effects. I carried out the hausman test: -hausman fe re- and these are my results, but I am unsure how to interpret them and whether fixed or random should be used?

    Test: Ho: difference in coefficients not systematic

    chi2(8) = (b-B)'[(V_b-V_B)^(-1)](b-B)
    = 51.56
    Prob>chi2 = 0.0000
    (V_b-V_B is not positive definite)
    Last edited by Zara Kenny; 03 Sep 2019, 03:10.

  • #2
    Zara:
    welcome to this forum.
    Despite the warning note, -hausman- points you towards the -fe- specification.
    You can run a confiormatory test via the community-contributed command -xtoverid- (just type -search xtoverid- from within Stata to spot and install it).
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Hi Carlo,

      Thanks for your prompt response. Would I definitely have to use the -fe- specification? When running the fe model, less variables are significant. It also omits one of my variables due to collinearity. Is this to do with multicollinearity? As I used the command -correl- with my variables and did not see any highly correlated variables so I am unsure why this has been omitted.

      Thanks for your help!

      EDIT: the variable dropped is a dummy variable stating whether the country has a coastline or not
      Last edited by Zara Kenny; 03 Sep 2019, 04:17.

      Comment


      • #4
        Zara:
        -have you checked with the community-contributed command -xtoverid-?
        The fact that you have more statistically significant coefficients with -re- is meaningless in -re- means misspecification (and, in general terms, hunting for the model with the highest number of statistically signicant coefficients is not the (inferential) way to go).
        The omission may be due to correlation with fixed effect; however, without taking a look at what you typed and what Stata gave you back (as the FAQ recommend you to do) the best interested listers can do is relying on guess-work.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5
          Hi Zara,

          So I had a similar problem with my model. Instead of running the Hausman test, I ran the Robust Hausman Test with the command -rhausman-
          You can run this command with the clustered standard errors of the FE and RE model. I assume this would provide you with a more unbiased and precise model specification.

          Comment


          • #6
            Hi Carlo,

            I downloaded the -xtoverid- command however it did not work. I think it may be due to having an older version of STATA and I am unable to download a current one on my laptop.

            Priya,

            I did run a robust hausman test and these were my results :

            b1: obtained from xtreg hdi_t oda_l1 oda_l2 coc_percentile democracy coastline psavt arable govexp popgrowth, fe vce(cl id)
            b2: obtained from xtreg hdi_t oda_l1 oda_l2 coc_percentile democracy coastline psavt arable govexp popgrowth, re vce(cl id)
            Excluded (not identified, or only identified in one model): coastline

            Test: Ho: difference in coefficients not systematic

            chi2(8) = (b1-b2)' * [V_bootstrapped(b1-b2)]^(-1) * (b1-b2)
            = 8.12
            Prob>chi2 = 0.4215

            I am unsure what these results show. Should I be using a fixed effect or random effect model? And what is the best test to do - the Robust Hausman test or the standard Hausman test?

            Thank you both for your help!

            Comment


            • #7
              Zara:
              reporting that a given command did not work (often as per user' expectetions) is not helpful.
              Please describe the problem you experienced, sharing via CODE delimiters what you typed and what Stata gave you back. Thanks.
              That said, the outcome of the community-contribute command -rhausman- points you to -re- specification.
              Kind regards,
              Carlo
              (Stata 18.0 SE)

              Comment


              • #8
                Hi Carlo,

                This is the output when I use -xtoverid-

                xtoverid
                Error - must have ivreg2/ivreg29/ivreg28 version 2.1.15 or greater installed

                I have just tried to install the newer version, and I am now getting this error message:

                xtoverid
                Error - must have ivreg2 version 2.1.15 or greater installed


                I keep using findit ivreg2 to install it but it says it is already installed?

                Thanks!
                Last edited by Zara Kenny; 06 Sep 2019, 03:20.

                Comment


                • #9
                  I also do not understand why the hausman tests indicates using a fixed-effect model whilst the rhausman test indicates using a random-effects model?

                  Comment


                  • #10
                    Zara:
                    your -hausman- outcome was not fully reliable.
                    Kind regards,
                    Carlo
                    (Stata 18.0 SE)

                    Comment


                    • #11
                      Hi Carlo,

                      Sorry to be a pain, I am very new to using STATA.

                      In that case I should be using the random-effects model? If this is the case, how would one test for heteroskedasticity in a random-effects model?

                      ​​​​​​​Thanks in advance!

                      Comment


                      • #12
                        Zara:
                        see: https://www.stata.com/support/faqs/s...tocorrelation/.
                        In addition, a visual ispection of idiosyncratic residual distribution can help, too.
                        Kind regards,
                        Carlo
                        (Stata 18.0 SE)

                        Comment


                        • #13
                          Zara: You'e hurting your ability to get advice by not showing output. For example, I happen to know that he usual Hausman test computed by Stata does not properly compute degrees-of-freedom when there are time dummies, or other variables with only time variation. I haven't used rhausman because I implement the robust Hausman test using the Mundlak regression. I don't know if it gets the degrees-of-freedom right.

                          Plus, how important are the differences in the estimates? It's not just the statistical outcome that is important. Do the estimates change a lot? How much is the difference in standard errors? If fixed effects gives you sufficiently precise results you should go with it. It's more robust than RE. The Hausman test is not perfect. In fact, it will fail to reject RE a lot even when it should reject it.

                          There's no need to test for heteroskedasticity in RE or FE. If you were to do that, you should test for serial correlation, too. Instead, use

                          Code:
                          xtreg y x1 ... xk, re vce(cluster id)
                          and that handles all problems with errors -- other than the possibility that the xj are correlated with the unobserved effect. FE allows that.

                          JW

                          Comment

                          Working...
                          X