Announcement

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

  • Newey and xtivreg2

    Hi everyone,

    I have a panel dataset and have concluded that I suffer from heteroskedasticity and serial correlation. Thus, I would like to use the Newey-West robust standard errors. Additionally, I am trying to run a fixed-effects model. My question is the following:

    I ran both:

    1) newey yvar xvar timeControls idControls, lag(6) force
    2) xtivreg2 yvar xvar timeControls idControls, fe bw(6) robust (Of course in this models, idControls are removed due to the fe option, and I am not including an instrumental variable)

    For Model 1, I obtain F(77,512)=12516.57 and Model 2 F(17,512)=0.40. Thus Model 1 is highly statistically significant whereas Model 2 is not at all. My t- and z- values are comparable, but not exactly equal.

    Does anyone know what is going on, and what model is correct to use?

    Thanks in advance,
    Panos

  • #2
    Hi Panos. A few things are going on here.

    1. The F for estimation (1) is F(77,512); for estimation (2) it's F(17,512). My guess is that the former is a joint test of everything including the (77-17=60) ID dummies, and the second is a test of just the 17 x variables. If you do a test of just the x vars in (1), you will probably get an F that is similar to the one you report for (2).

    2. You are not using exactly the same VCE estimator in both. To implement the Bartlett/Newey-West kernel, xtivreg2 uses bw=bandwidth; newey uses lags. They aren't the same because technically the last lag in the bandwidth has a zero weight. If you use bw=7 and lags=6 they'll be compatible. (I think this is covered in the ivreg2 help file somewhere.)

    3. newey+force doesn't handle breaks in time series the way you probably want it to. You should use either ivreg2 or David Roodman's newey2 instead.

    4. The t- and z- stats will be slightly different because (2) is not using a small-sample adjustment that accounts for the K regressors. You can optionally use the small option with xtivreg2 if you want this.

    5. And maybe most important: the Newey-West method requires large-T asymptotics. I can't tell how many time periods you have, but if it is a small-ish number, you probably shouldn't use
    Newey-West. And since you apparently have 60 panel observations, the cluster-robust VCE looks like it would be a good choice for detailing with heteroskedasticity and autocorrelation. It requires a large-N asymptotics only, and 60 is usually considered "large enough".

    HTH,
    Mark

    Comment


    • #3
      Perfect, thanks so much Mark.

      I tried using vce(cluster id) but unfortunately I have too few groups (and I don't get an output for my F-statistic.

      One last question: Is there a way to calculate R-squared for newey2? There is a thread on the Stata forums that leads to http://www.stata.com/support/faqs/statistics/r-squared/, but when I use this "hand-calculation" method and compare it to the automatically output one by xtivreg2, I get wildly different answers. Any idea why, and which one I should be preferring?

      Thanks,
      Panos

      Comment


      • #4
        Panos,

        You say

        "I tried using vce(cluster id) but unfortunately I have too few groups (and I don't get an output for my F-statistic."

        but that's not quite right. You are not getting an F statistic because it would include more regressors than clusters, and that's because you are including the panel dummies as explicit regressors, and you really shouldn't.

        This problem doesn't arise with xt estimators because the panel dummies are removed by the within (demeaning) transformation.

        This is also why you are getting different R-squares. xtivreg2 and other xt estimators will give you a "within-R-sq", whereas newey2 and other non-xt estimators will give you an R-sq that includes the effect of the panel dummies (and is therefore probably meaningless in your application). If you want to see how a within-R-sq is calculated, have a look at the manual entry for xtreg.

        --Mark

        Comment

        Working...
        X