Announcement

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

  • xtreg vs xtregar give very different parameters

    Most discussions of xtreg and xtregar emphasize xtreg's ability to use robust standard errors. However, as I understand it, xtreg is not consistent on the parameters under serial correlated errors, but xtregar is consistent if the error structure is only a one period serial correlation.
    All of these discussions seem to assume that the two estimators give somewhat similar parameter estimates.
    I've hit data where I get massively different betas between the two estimators. Here is an example:

    . xtregar oee c.numlines ,fe

    FE (within) regression with AR(1) disturbances Number of obs = 43,657
    Group variable: sitexline Number of groups = 1,124

    R-squared: Obs per group:
    Within = 0.0043 min = 1
    Between = 0.0303 avg = 38.8
    Overall = 0.0178 max = 59

    F(1,42532) = 184.43
    corr(u_i, Xb) = -0.1303 Prob > F = 0.0000

    ------------------------------------------------------------------------------
    oee | Coefficient Std. err. t P>|t| [95% conf. interval]
    -------------+----------------------------------------------------------------
    numlines | .7376822 .0543185 13.58 0.000 .6312169 .8441475
    _cons | 70.71834 .1576968 448.44 0.000 70.40925 71.02743
    -------------+----------------------------------------------------------------
    rho_ar | .54586885
    sigma_u | 12.837564
    sigma_e | 7.2494405
    rho_fov | .75821216 (fraction of variance because of u_i)
    ------------------------------------------------------------------------------
    F test that all u_i=0: F(1123,42532) = 14.33 Prob > F = 0.0000

    .
    .
    . xtreg oee c.numlines if e(sample),fe robust

    Fixed-effects (within) regression Number of obs = 44,795
    Group variable: sitexline Number of groups = 1,138

    R-squared: Obs per group:
    Within = 0.0001 min = 1
    Between = 0.0146 avg = 39.4
    Overall = 0.0173 max = 60

    F(1,1137) = 0.60
    corr(u_i, Xb) = 0.1393 Prob > F = 0.4390

    (Std. err. adjusted for 1,138 clusters in sitexline)
    ------------------------------------------------------------------------------
    | Robust
    oee | Coefficient std. err. t P>|t| [95% conf. interval]
    -------------+----------------------------------------------------------------
    numlines | .0719856 .092992 0.77 0.439 -.1104697 .2544409
    _cons | 74.14837 .5735115 129.29 0.000 73.02311 75.27363
    -------------+----------------------------------------------------------------
    sigma_u | 13.830154
    sigma_e | 8.2724051
    rho | .73649924 (fraction of variance due to u_i)


    I understand that xtregar loses an observation for each panel due to the serial correlation correction, but we're only talking 1000 observations on a 40000 observation estimation.
    Any ideas what is going on would be appreciated.

    Phil

  • #2
    Phil:
    welcome back.
    Have you already considered the community-contributed module -xtscc-?
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Carlo,
      Thanks! I hadn't remembered it.
      Phil

      Comment

      Working...
      X