Announcement

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

  • Fixed vs Random vs Pooled OLS

    Hello, I am currently new to Stata and this forum as I am now writing my thesis. I am currently trying to arrive at a decent model but have some trouble choosing between a fixed and random model or OLS. The data is in panel form and consists of 4289 observations.

    I did a test for heteroskedasticity and it showed that I should use robust standard errors, which I have done from now.

    When I use xtreg with robust random effects, my sigma_u is 0 and xttest0 also shows that random effects are not present which means that pooled OLS is preferred over a random effect model if I have understood it correctly?
    Moreover, when i use xtreg, fe, the F-test is significant, and a rhausman (rhausman) is also significant, which indicates that a fixed effect model is preferred both over pooled OLS and a random effect model?

    However, when i conduct a fixed effect model, all my country dummy variables disappear (which are my only dummy variables), and my R-squared is a lot lower than it is with a pooled OLS and random effects model:

    R-squared adjusted with Pooled OLS:
    0.7819

    R-squared with random effects:
    Within = 0.2839
    Between = 0.9769
    Overall = 0.7832

    R-squared with fixed effects:
    Within = 0.3069
    Between = 0.0947
    Overall = 0.0009

    Is fixed effect the way to go in this case even though the R-squared is lowered a lot? Why do they decrease so much when I use a fixed effect model?

    Sorry for writing everything in a text. I tried to use -dataex- to display each regression but I kept getting this error message every time: "input statement exceeds linesize limit. Try specifying fewer variables"

    Kind Regards,
    Louis

  • #2
    Louis:
    welcome to this forum.
    1) if you need non-default standard errors, you cannot use -hausman- to choose between -fe- and -re- estimator. You should consider the community-contributed module -xtoverid- (type -search xtoverid- from within Stata and follow the instructions to install it);
    2) please note that -xtoverid- test the null "-re- is the way to go". Therefore, you should go -xtreg,re vce(cluster panelid)- and then run -xtoverid-;
    3) being a bit old-fashioned, -xtoverid- does not support -fvvarlist- notation. See -xi:- prefix as a possible work-around;
    4) you should look at R_sq within and R_sq between when you go -fe- and -re-, respectively
    5) as expected, the -fe- estimator wiped out all your time-invariant variables.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Hi!

      Thank you very much for all the help Carlo! Why would -rhausman-, which I've understood works as a robust hausman test, not work in this situation?

      Kind Regards,
      Louis

      Comment


      • #4
        Louis:
        yes, you can use the community-contributed -rhausman-.
        Oftentimes, advice are driven by personal habits or tastes .
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          I see, thank you very much Carlo!

          I have one last question. If I have time-invariant dummies that are omitted in a fixed effect model, but stay in a random effect model and want to use -xtoverid- or -rhausman- to see which model is preferred, should I conduct the test when excluding the dummies as they won't be included in the fixed effect model? For example:

          xtreg gscore env dummy1 dummy2, re vce(cluster id)

          estimates store re

          xtreg gscore env dummy1 dummy2, fe vce(cluster id)

          estimates store fe

          rhausman re fe, cluster

          Since the time-invariant dummies (lets say dummy1 and dummy2) will all be omitted in the fixed effect model, will that in some way affect the robust hausman test? How would I do in this situation?

          Comment


          • #6
            Louis:
            what follows refers to the community-contributed module -xtoverid-, as I am not familiar with -rhausman-:
            Go:
            Code:
            xi: xtreg depvar indepvars, re vce(cluster clusterid)
            xtoverid
            1) the -xtoverid- null is: -re- is the way to go.
            2) the -xi:- prefix takes categorical variables into account, as -xtoverid- does not support -fvvarlist- notation;
            3) do not delere time-invariant predictors, as the -re- estimator returns a coefficient for each one of them.
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              Hi,

              I keep getting this message: "Error - saved RE estimates are degenerate (sigma_u=0) and equivalent to pooled OLS"

              Does this mean that I should instead look at the F-test for my fixed effect model to decide whether to use fixed effect over pooled OLS/random effects?

              Comment


              • #8
                Louis:
                it means that you should go pooled OLS.
                Kind regards,
                Carlo
                (StataNow 18.5)

                Comment

                Working...
                X