Announcement

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

  • Fixed effects versus Random effects

    Dear all,

    I’m writing my dissertation using a panel dataset. My question is about the choice between FE versus RE.

    The Hausman test indicated that the FE model is preferred as to the RE model (p-value = 0).

    I read, however, that RE is more suitable if your variables are either time invariant or only slightly change over time. My main explanatory variable is a dummy variable, more precisely the adoption of an ISO certification. I believe that this variable is as well only slightly changing over time (as companies that get certified are very likely to stay certified in the successive years) and thus my concern is whether it is, in this case, better to choose for RE?

    As I am new to panel data, I have some doubts about this reasoning and I would really appreciate your thoughts and comments.

    Thanks in advance!

    All the best,

    Lizzy

  • #2
    Lizzy:
    welcome to this forum.
    As per FAQ, please post what you typed and what Stata gave you back via CODE delimiters and/or -dataex- Thanks.
    Your understanding is correct, However, going -re- when -fe- would be the way to go can give back inconsitent estimates.
    Moreover, -fe- assumes the panel-wise effect to be correlated with the vector of regressors, whereas -re- does not.
    Without taking a look at ayour data, my take is to go -fe-.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,

      Thank you for responding on such short notice and for giving the advice on the use of FE model. I received a part of the data from my professor and for that I don’t dare to share it here on this forum. But these were the codes I used to run the Hausman test:

      Code:
      xtreg TobinsQ_w lagd_ISO lagSize lagLeverage_w lagGrowth_w lagInflation_w i.Year i.Industry i.CoHQ_n, fe
      estimates store FEM
      xtreg TobinsQ_w lagd_ISO lagSize lagLeverage_w lagGrowth_w lagInflation_w i.Year i.Industry i.CoHQ_n, re 
      estimates store REM
      hausman FEM REM, sigmamore
      Kind regards,

      Lizzy

      Comment


      • #4
        Lizzy:
        your codes look OK.
        The only option that might be lacking is cluster-robust standard error (ie, -robust- or -vce(cluster panelid)- options, that do the very same job under -xtreg-, as you can easily check it out yourself)
        Please remember that, if you go non-default standard errors,:
        - you should switch from -hausman- to the community-contributed command -xtoverid- (just type -search xtoverid- to spot and install it);
        - -xtoverid- null is that -re- is the way to go: it implies that a) you can simply run -re- only before invoking -xtoverid-; b) you should go -fe- is -xtoverid- outcome reaches statatistical significance (ie, rejects the null);
        - being glorious but a bit old-fashioned, -xtoverid- does not support -fvvarlist- notation: hence, you have to prefix your -re- code with -xi:-, as you can see in the following toy-example: (in which I go -vce(cluster) as per my habit, but I could have used -robust- and the very same resuts would appear)
        Code:
        xi: xtreg TobinsQ_w lagd_ISO lagSize lagLeverage_w lagGrowth_w lagInflation_w i.Year i.Industry i.CoHQ_n, re vce(cluster panelid)
        ;
        - as a nonsensical aside, that was for many years a sort of tradition on this forum, I finish off my reply with the following wish "May the 4th be with you"
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hello Lizzy and Carlo,

          Please allow me to join the conversation, as i have a very related inquiry
          And I have a question for Carlo plz,
          I also do some investigation using panel dataset, concisely the impact of financial openness on growth(dependent variable)
          I use two types to measure the openness de jure and de facto indexes, so I run the regression using one type with both techniques FE and RE
          When to decide between them by hausman, when using the de jure measure I receive " the model fails to meet the assumptions of the test" message
          But it provides a significant indication when using the de facto measure suggesting the FE.

          Can I only rely on this in my choice?
          Also, for running the test, should it be FE / est store / RE / est store / hausman or can I change this order and start with the RE ?

          worth to note that I used the vce(cluster) option and didn't used for the same equation and the results almost didn't change, so should i use it or not?

          Thanks a lot

          Comment


          • #6
            Hello again 😊

            Thanks once more for your help and time!

            I wanted to add that I do use ‘vce (cluster panelid)’ in the regressions, but didn’t include them in the specific codes I’ve sent as the Hausman test is not able to give the output with cluster-robust standard errors?

            If I understand it correctly, I thus should use -xtoverid- in my case instead of -hausman- as I opt for the approach to run the regression with the cluster-standard errors? The code you provided with -xi- should then allow me to run -xtoverid- while making use of dummies and i.prefix? I did it as follows:

            Code:
            xi: xtreg TobinsQ_w lagd_ISO lagSize lagLeverage_w lagGrowth_w lagInflation_w i.Year i.Industry i.CoHQ_n, re vce(cluster panelid)
            xtoverid
            Unfortunately I did not manage do get the results, but ‘o. operator not allowed’ appears. Are you able to spot something that could cause this in the commands I used?

            Kind regards,

            Lizzy

            Comment


            • #7
              Lizzy:
              your code is correct.
              As per -xtoverid- error message, it seems that you have an omitted variable due to collineraity in your original regression.
              Is that were the case, omit it in your -xtreg- code amd re-run -xtoverid-.
              Kind regards,
              Carlo
              (Stata 19.0)

              Comment


              • #8
                Omar:
                I would go cluster-robust standard errors, -xtreg,re- and then -xtoverid-.
                Your -hausman- outcome is not reliable.
                You cannot reverse the -fe- -re- sequence in -hausman-.
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Thanks Carlo for the support.
                  excuse my novelty to this world,

                  but i went with this command
                  xi: xtreg lnGDP SCHOOL TRADE INFLATION GC Oil lnINGDP FINANCIALDI KAOPEN, re vce(cluster country) xtoverid
                  But can' manage to get the results as xtoverid option is not allowed.

                  What can you see missing/wrong inhere ?

                  Comment


                  • #10
                    Omar:
                    to access the community-contributed command -xtoverid-, type -search xtoverid- and install it.
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment


                    • #11
                      Thanks Carlo

                      Comment

                      Working...
                      X