Announcement

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

  • Difference between reg vce cluster (id) AND reg robust cluster (id)

    Hello everyone,

    I am using panel data and running a model with the Least Squares Dummy Variables Model (LSDVM).

    I have heteroskedasticity and autocorrelation in one of my specifications and only autocorrelation in the others.

    However, I am confused about the difference of the following standard errors:
    1.
    Code:
    reg Y X1 X2, vce cluster (id)
    and

    2.
    Code:
    reg Y X1 X2, robust cluster (id)
    Is robust cluster (id) to deal with both autocorrelation and heteroskedasticity?
    And is vce cluster (id) only to deal with autocorrelation?


    Thanks in advance,
    Best,
    Simona

  • #2
    Simona:
    both codes do the same job:
    Code:
    use "C:\Program Files (x86)\Stata15\ado\base\a\auto.dta"
    . reg price mpg trunk, cluster(foreign)
    
    Linear regression                               Number of obs     =         74
                                                    F(0, 1)           =          .
                                                    Prob > F          =          .
                                                    R-squared         =     0.2222
                                                    Root MSE          =     2637.6
    
                                    (Std. Err. adjusted for 2 clusters in foreign)
    ------------------------------------------------------------------------------
                 |               Robust
           price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             mpg |  -220.1649   45.58852    -4.83   0.130    -799.4219    359.0922
           trunk |   43.55851   9.441408     4.61   0.136    -76.40595     163.523
           _cons |   10254.95   185.7531    55.21   0.012     7894.732    12615.17
    ------------------------------------------------------------------------------
    
    . reg price mpg trunk, robust cluster (foreign)
    
    Linear regression                               Number of obs     =         74
                                                    F(0, 1)           =          .
                                                    Prob > F          =          .
                                                    R-squared         =     0.2222
                                                    Root MSE          =     2637.6
    
                                    (Std. Err. adjusted for 2 clusters in foreign)
    ------------------------------------------------------------------------------
                 |               Robust
           price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             mpg |  -220.1649   45.58852    -4.83   0.130    -799.4219    359.0922
           trunk |   43.55851   9.441408     4.61   0.136    -76.40595     163.523
           _cons |   10254.95   185.7531    55.21   0.012     7894.732    12615.17
    ------------------------------------------------------------------------------
    For the sake of efficiency, I would go -vce(cluster clusterid)-.
    The -robust- option in -regress- offers more ways to deal with heteroskedasticity, but cannot relax the assumption of the independence of observations within the same cluster.
    Kind regards,
    Carlo
    (Stata 15.1 SE)

    Comment


    • #3
      Thank you a lot for the prompt reply.

      So I am right in saying that -vce (cluster clusterid)- can deal with heteroskedasticity, serial correlation and also inter-dependence of within-cluster observations?

      Comment


      • #4
        Simona:
        yes, with the the sidenote that serial correlation is another way to say non-independent observations within the same cluster (ie, panel).
        Kind regards,
        Carlo
        (Stata 15.1 SE)

        Comment


        • #5
          A huge thank you for the elucidation and for your time!

          Best regards,
          Simona

          Comment

          Working...
          X