Announcement

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

  • Should i use fixed effects or random effects for my paneldata ??

    Hello,
    I am currently writing a thesis on democratization in Latin America and the Caribbean.
    I have paneldata consisting of 22 countries over a period of time from 1975-2010 with 5 years intervals.
    My dependent variable is "democracy" and my independent variable is an index called "economicdevelopment", consisting of GDP per capita, education, urbanization and industrialization.
    We're basically testing the modernization theory, expecting that economic development has a positive effect on democracy.

    We would like to know whether we should use random- or fixed-effects. Our Hausman test suggest RE due to a high p-value 0.996.
    We're unsure about the results, because we cant really seem to figure out WHY we should use RE. We cant find any reason that supports our argumentation, besides the Hausman test, on why we should use RE. We have to write som eadvantages in our study, so we would like to ask you, what the advantages of RE is and why it is good for our thesis.
    So far our OLS and RE regressions get the same results (which is good?) but we need another argument for using RE besides the Hausman test.
    My reg looks like this:

    xtreg democracy economicdevelopment i.year, re robust

    We are not experts at stata, so if you could please try to explain it as simple as possible that would be fantastic! Thank you.

    Hope you can help us.
    Best regards Simone
    Last edited by Simone Skovshoved; 26 Mar 2020, 06:50.

  • #2
    Simone:
    welcome to this forum.
    I do not think that interested listers can tell you whther or not -re- specification is good for your thesis.
    In addition, I cannot get wht -re- specification cannot be ok for your regression analysis.
    However, other issues seem relevant:
    - did you check whether your model is ill-specified?
    - how could you have used -hausman- with non-default standard error?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Simone: Following up on Carlo's helpful comments, we really need to see your output. There are several reasons the Hausman test can be leading you astray. For one, it gets the degrees-of-freedom wrong if you use the standard form and have included year dummy variables (as you have). Second, your comment that OLS and RE give the "same" results suggests that RE is using an estimate of zero for the unobserved effect. That's not good.

      Even without seeing your results, it's likely you should be using fixed effects. With large aggregated units you need to control for differences that are correlated with your covariates. No one will really believe the results, especially if your RE estimates suffer the way I think they do. Plus, you should only use a robust version of the Hausman test that also gets the degrees-of-freedom right. But I doubt I'd even compute the test. I'd go with FE so you eliminate systematic cross-country differences.

      JW

      Comment


      • #4
        Hello. Thank you so much for your responses. I am not quite sure which output you would like to see. So here is the output from my regression:

        xtreg demokrati økonomiskudvikling politiskeinstitutioner naturressourcer etniskfragmentering i.year, re robust

        Click image for larger version

Name:	Skærmbillede 2020-03-26 kl. 17.48.27.png
Views:	2
Size:	52.2 KB
ID:	1543061


        ... Im not advanced in STATA, so i dont know what ill-specified or non-default standard error means. Please tell me if you would like to see another output, that can better visualize my problem.
        Kind regards


        Attached Files

        Comment


        • #5
          A good start. Now show the FE estimates and the output from the Hausman test. For the Hausman test, you will have to drop "robust" in both cases (which is the same as cluster(countryid)). I'm guessing it will show 11 degrees-of-freedom when the correct df is 4.

          Comment


          • #6
            Thank you for your response. Here are the outputs from the FE regression and the Hausman test.
            I have also read your chapter on simple panel data methods, and it has helped me along way! So another thank you for writing such a good book I hope I have the outputs right.

            Click image for larger version

Name:	Skærmbillede 2020-03-26 kl. 19.26.02.png
Views:	1
Size:	55.8 KB
ID:	1543093



            Click image for larger version

Name:	Skærmbillede 2020-03-26 kl. 19.27.18.png
Views:	1
Size:	34.9 KB
ID:	1543092

            Comment


            • #7
              Simone;
              if the sky-rocketing -hausman- test p-value can be considered available, you shoul go -re-.
              As an aside, ignoring something as misspecification test (see -linktest- entry in Stata .pdf manual for a procedure that. with some tweaks can be used for panel data regression, too) or non-default standard errors (ie, robust, cluster, bootstrap, jacknife) can make your analysis really difficult to manage: Stata commands imply that the researcher knows at least the theoretical building blocks of the statistical procedure(s) she/he is interested in.
              Kind regards,
              Carlo
              (StataNow 18.5)

              Comment


              • #8
                Okay, thank you. I will read upon that. I did the estimates without i.year, and now the Hausman suggests fixed-effects (p=0.0174) So i will go with that. But thank you for your repsonses and help

                Comment


                • #9
                  Simone:
                  omitting variables trying to force -hausman- outcome to confirm you can go -fe- sounds not that scientific.
                  Besides, if -year- are actually part of the data generating process, your model is misspecified.
                  You should live with the data (and their results) as they are.
                  Kind regards,
                  Carlo
                  (StataNow 18.5)

                  Comment


                  • #10
                    Simone: Here are some thoughts. As a general rule, do not be dictated too much by the outcome of these specification tests. It is known that the Hausman test -- even when properly done -- can have low power. Patrik Guggenberger has an article on that in the Journal of Econometrics. Therefore, failing to reject RE doesn't mean you should use it. Context matters, too. Since FE is clearly the more robust of the two estimators, I lean towards it unless the standard errors of FE are "too large." This is something we all need to remember: if you use FE, and the estimates and cluster-robust standard errors are acceptable, there's no reason to even consider RE. We can't become automatons and just go on the basis of the Hausman test.

                    What I'd like to see is the FE estimates with vce(cluster id) standard errors. It seems to me like these will be almost as precise as RE, which points to using FE no matter what. RE, conceptually, is weird with aggregated units.

                    More specific observations.

                    1. Two of your variables don't change over time, I guess, and so the fall out of FE. That's why Stata reports 9 df rather than the 11 I predicted. But the 9 is incorrect. It should only be two. One way to get the correct df is to use

                    Code:
                    hausman fixed random, sigmamore
                    In my experience, this forces Stata to compute the correct df. However, the test is still nonrobust, so I wouldn't really rely too much on it.

                    2. There is a simple way to obtain a robust test, and to also add back in the time-constant variables. This is the so-called Mundlak approach.

                    Code:
                    egen økonomiskudvikling_bar = mean(økonomiskudvikling), by(countryid)
                    egen naturressourcer_bar = mean(naturressourcer), by(countryid)
                    xtreg demokrati økonomiskudvikling politiskeinstitutioner naturressourcer etniskfragmentering økonomiskudvikling_bar naturressourcer_bar i.year, re vce(cluster countryid)
                    test økonomiskudvikling_bar naturressourcer_bar
                    3. Be sure to include the year fixed effects. The analysis is not convincing without them. In these kinds of examples, including country and time fixed effects is imperative. My discussion here of the robust Hausman test is mostly for future reference.

                    So, use FE, inlcude i.year, and cluster your standard errors. That's my advice. You don't have to compute the Hausman test if you're not considering using RE.

                    JW

                    Comment


                    • #11
                      Carlo: Yes you are right. I just have to argue my way out of it and accept the dataset.
                      Woolridge: I understand your point and have used your suggestions for the further proces. After i used following code:
                      hausman fixed random, sigmamore the test shows 2 df I will go with FE since i have time constant variables.
                      Thank you both your time and adequate suggestions. You have been very helpful. Have a great weekend.

                      Comment

                      Working...
                      X