Announcement

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

  • Multi-way clustering when using pooled OLS on unbalanced panel data with cgmreg

    Hello Stata Forum,

    I have individual level observations annually from 2009-2015 in an unbalanced panel data structure. I use pooled OLS because the main variables of interest are time invariant. As my outcome variable I got logrealwages, as explanatory variables I entertain workexperience and the countries' gross domestic product the individual comes from, among others. So far, I have been using the cgmreg command in Stata based on the paper by Cameron, Gelbach, Miller (CGM) “Bootstrap- Based Improvements for Inference with Clustered Errors”, Review of Economics and Statistics, 90(3), 2008, 414–427 as follows:
    cgmreg logrw constant workexp gdp error(i,t,c), cluster(i country) where individual i, at time t, from country c.
    Given the panel structure, for a given i, I have correlated errors across time within individuals
    , for a given t, I have correlated errors across individuals within countries
    , for a given c, I have correlated errors across time.

    If my reasoning is correct, should I then use cgmreg , cluster(i country year). If I do so, my standard errors become smaller rather than bigger.

    I am sure something is wrong here and I would appreciate your input.

    Thanks a lot!

    Nico

  • #2
    I don't use cmgreg. I don't think theoretically that clustering necessarily increases standard errors. You might see if you get similar results with other estimators comparing clustered and non-clustered estimates (although often Stata gives both cluster and robust automatically).

    Comment


    • #3
      Hi Professor Bromiley,

      I sincerely appreciate your reply. So what commands or estimators do you use for two-way clustering in Stata may I ask?

      I thought cmgreg was my only option.

      Thanks a lot!

      Nico

      Comment


      • #4
        Many like reghdfe but I haven't used it. With complex error structures, xtgls might be an option - best if lots of observations on fewer panels. There is also the possibility of using sem or gsem although they aren't very easy.

        Comment


        • #5
          That helps, thank you very much!

          Best wishes,

          Nico

          Comment

          Working...
          X