Announcement

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

  • Pooled OLS and robust standard errors

    Dear Stata users,

    I don't have a lot of experience using the software and I'm currently working on my master's thesis, so I really need your help.

    I have a panel data (65 countries, 12 years per country) and it is strongly balanced. Since I have to run several robustness tests (regressions) to finally come up with strong final results, I know the commands to run panel data regression ( xtset ... xtreg, fe , re, be...) However, my main problem is that I'm not sure if I'm a running the right Pooled OLS regressions with robust standard errors.

    Is this code correct to use Pooled OLS with robust standard errors????? Should I use robust or vce (cluster country_code)... I'm not sure if I should cluster by country, to be honest it doesn't make sense to me, I believe clustering is useful only if you have firms of the same industry or households information within the countries... which is not my case, I'm working with country data only.

    reg dependvar regressor1 regressor2 .... regressor_n, robust

    or Should I use:

    reg dependvar regressor1 regressor2 .... regressor_n, vce (cluster country_code)

    Another question, some of the papers similar to my thesis run a fixed effect and random effect models using one lag of the dependent variable... how can I include one lag of the dependent variable in the fixed and random effect models?

    xtreg dependvar regressor1 regressor2 .... regressor_n l.dependedvar, fe robust .... is this ok?

    Thanks for any help you can give me.

    Regards,
    Ivan







  • #2
    Ivan:
    welcome to this forum.
    The correct code to run a pooled OLS (I do not comment on the more substantive issue, that is: is pooled OLS correct given your panel data?) is:
    Code:
    reg dependvar regressor1 regressor2 .... regressor_n, vce (cluster country_code)
    If you do not cluster at -panelid- level, you're implicitly tell Stata that you have independent observations (which is not the case, as observations belonging to the same country are, in all likelihhod, more similar than observations belonging to another country).

    As far as your last question is concerned, using lagged regressand in a panel data regression setting makes your panel dynamic (see -xtabond-).
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Hi Carlo,

      Thanks a lot for your help, that is exactly the answer I was looking for.

      Yes, you are right it is the Arellano-Bond estimation.

      Sorry to bother you again, just one more question.

      If I want to run a Fixed effect and random effect estimation correcting for the presence of heteroskedasticity and autocorrelation in the standard errors...

      Is this enough?

      xtreg dependvar regressor1 ... regressor_n, fe robust

      or Should I run a FE-AR(1) regression? ... However, I don't know the code to add AR(1) to the FE regression

      Again, thanks a lot.

      Regards,
      Ivan







      Comment


      • #4
        Ivan:
        as your N (cross-sectional) dimension is > T (time-series) dimension, I would go:
        Code:
        xtreg dependvar regressor1 ... regressor_n, fe robust
        xtreg dependvar regressor1 ... regressor_n, re robust
        xtoverid
        Please also note that under -xtreg- (unlike -regress-) the options -robust- and -vce(cluster panelid)- do the very same job.
        Unfortunately, as -hausman- do not support non-default standard errors, you should switch to the user-written command -xtoverid- (the null is, strictly speaking, that -re- is the way to go. That's why you can simply run -xtreg,re- and then -xtoverid-; if the p-value is statistical significant, you should go -fe-).
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Thanks Carlo,

          I'm using Stata 16 and I'm afraid the command xtoverid is not recognized by Stata.

          Regards,
          Ivan

          Comment


          • #6
            Ivan:
            being a community-contributed command (and not a Stata built-in one), to spot and install it you have to type:
            Code:
            search xtoverid
            Kind regards,
            Carlo
            (StataNow 18.5)

            Comment


            • #7
              Dear Carlo,

              Now it works. I really appreciate your help.

              Thanks a lot, have an amazing day!!

              Regards,
              Ivan


              Comment


              • #8
                Dear Carlo,

                I take advantage of this previous post to ask something. I want to run a Pooled OLS regression with clustered errors, with the code you have provided above. The thing is that I don't have a panel but a peudo panel. How should that code change in order to consider the cohorts? or is it considered in that parentheses?
                reg dependvar regressor1 regressor2 .... regressor_n, vce (cluster country_code) Seeing the previous code I would state mine as: reg inglab_hora escolaridad experiencia experiencia_squ horas_mes, vce (cluster cohort?) I would like to first try a cohort defined by region of birth, but also birth year. Do you know a good guide on how to define in the best way birth_year cohorts? I am using data of a survey in 2014, another of 2017, and another one of 2021 I thank you in advance for your time and help Silvana

                Comment


                • #9
                  Silvana:
                  it would seem that you're dealing with a repeated cross-sectional study.
                  In you want to cluster on cohorts because you think that tindividuals belonging to the same cohort are more similar -vce(cluster cohorts)- is the way to go.
                  Kind regards,
                  Carlo
                  (StataNow 18.5)

                  Comment


                  • #10
                    Dear Carlo, thanks!

                    Comment

                    Working...
                    X