Announcement

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

  • OLS vs FE vs RE? Tests results conflicts.

    Dear Stata specialists,

    Hope you can help me solve my problem.

    I recently run OLS, FE, RE for my panel data model and perform some tests to choose between the methods.

    The F-test turns out that OLS is preferred to FE (F = 0.873, df1 = 62, df2 = 431, p-value = 0.7409)
    LM test shows that RE is preferred to OLS (chisq = 15.505, df = 1, p-value = 8.227e-05)
    Hausman test shows that FE is preferred to RE. (chisq = 38.851, df = 10, p-value = 2.696e-05)
    Hausman test shows that FE is preferred to OLS. (chisq = 40.176, df = 10, p-value = 1.578e-05)

    The test results puzzle me and I cannot decide which method to choose.

    Thank you very much!
    Andy

  • #2
    Technically, I would trust the last three tests. For the first test, one may suffer severe type-II error by "accepting" the null. Practically, I would probably use FE directly without doing any tests.

    Comment


    • #3
      Maybe there are facts about your data or about the inference you'd like to do that are relevant? Running the gamut of tests Stata has is typically not the best course of action.

      Comment


      • #4
        Andy:
        Two asides to previuos helpful advice:
        1) did you detect a panel-wise effect?
        2) as per FAQ, could you please share what you typed and what Stata gave you back as far as pooled OLS and -xtreg- codes are concerned? Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Andy:
          Two asides to previuos helpful advice:
          1) did you detect a panel-wise effect?
          2) as per FAQ, could you please share what you typed and what Stata gave you back as far as pooled OLS and -xtreg- codes are concerned? Thanks.
          Thanks Carlo for your response.

          Honestly, I'm not a Stata user, I use R instead. This is the first time I post a question in this forum. However, I always learn the most useful information and get my questions answered by browsing this forum, thanks to people like you.

          For your question:

          1. Do you mean the Breusch-Pagan Lagrange multiplier (LM) test?

          I ran "plmtest" in R which is equivalent to xttest0 in Stata, I think. The difference is in Stata we run xttest0 after running xtreg, re; while in R we run plmtest after running OLS.
          Here is the result:

          plmtest(ols, effect="individual", type=c("bp"))

          Lagrange Multiplier Test - (Breusch-Pagan) for balanced panels

          data: y ~x1 + x2 + x3 + x4 + ...
          chisq = 15.505, df = 1, p-value = 8.227e-05
          alternative hypothesis: significant effects


          2. One thing I find is that the coefficients on independent variables in RE and OLS are identical. For the test results, details as below:

          - F-test for FE vs OLS
          pFtest(fe, ols)

          F test for individual effects

          data: y ~x1 + x2 + x3 + x4 + ...
          F = 0.873, df1 = 62, df2 = 431, p-value = 0.7409
          alternative hypothesis: significant effects


          - Hausman test for FE vs RE:
          phtest(fe,re)

          Hausman Test

          data: y ~x1 + x2 + x3 + x4 + ...
          chisq = 40.176, df = 10, p-value = 1.578e-05
          alternative hypothesis: one model is inconsistent


          - Hausman test for FE vs OLS:
          phtest(fe, ols)

          Hausman Test

          data: y ~x1 + x2 + x3 + x4 + ...
          chisq = 40.176, df = 10, p-value = 1.578e-05
          alternative hypothesis: one model is inconsistent



          Please let me know if I need to clarify anything.

          Cheers,
          Andy
          Last edited by Andy Ho; 29 Nov 2021, 07:51.

          Comment


          • #6
            Thanks Fei Wang and Jackson Monroe,

            So may I just base on the economic inference with resonable arguments to use the prefered estimator (i.e FE) without conducting the tests?

            Comment


            • #7
              Andy:
              you're obviusly expected to use Stata for your analysis and related queries, given the goal and the audience of this forum.
              You do not specify whether you performed a pooled OLS with clustered standard errors, since panel-specific observations are not independent.
              That said, as per -hausman- outcome I would go -xtreg,fe-.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Thanks Carlo for your helpful recommendations.
                I did a pooled OLS with clustered standard errors. However, in R, I don't think the tests work for regressions with the clustered SE option. I think I will stick with FE and will find a chance to run the regressions in Stata.
                Cheers, Andy

                Comment


                • #9
                  Andy:
                  please also note that when -xtreg,fe- is the way to go, pooled OLS is inconsistent (as the latter requires the panel-specificif error term -ui- to be not correlated with the vector of regressors -xit-), as reported in https://www.stata.com/bookstore/micr...metrics-stata/, page 254.
                  Kind regards,
                  Carlo
                  (Stata 19.0)

                  Comment

                  Working...
                  X