Announcement

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

  • xtivreg2 v01.0.17 first-stage f-stat (cf. xtivreg or hand-written first stage xtreg)

    I am using Stata 14 and xtivreg2 version 01.0.17.

    Why are the first stage f-stats different even for the case of one endogenous regressor and one instrument (exactly identified)? Is the Sanderson-Windmeijer estimator, used by xtivreg2, too conservative? Am I missing something?

    For my project, if I use the value calculated by the official "xtivreg" or hand-written "xtreg", I can reject that the instrument is weak using the critical values in Stock and Yogo (2005).

    For the code that follows, here are the F-stats ... I use a publicly available dataset here but I get the same rank order for f-stats for the project I am using (i.e. xtivreg2 gives the smalles f-stat).

    Case I: F-stat is 3.39
    Case II : F-stat is 2.91
    Case III: F-stat is 0.11


    Code:
    use http://cameron.econ.ucdavis.edu/musbook/mus08psidextract.dta
    xtset id t
    
    cls
    
    display "CASE I: hand-written first stage"
    xtreg wks ms exp exp2 , fe vce(robust)
    
    
    display "CASE II"
    xtivreg lwage exp exp2 (wks = ms), fe first vce(robust)
    
    
    display "Case III"
    xtivreg2 lwage exp exp2 (wks = ms), fe first cluster(id)




  • #2
    Hello Baykaar,

    This is what I get when using the latest version of Stata for the first two cases

    Code:
    . display "CASE I: hand-written first stage"
    CASE I: hand-written first stage
    
    . xtreg wks ms exp exp2 , fe vce(robust)
    
    Fixed-effects (within) regression               Number of obs     =      4,165
    Group variable: id                              Number of groups  =        595
    
    R-sq:                                           Obs per group:
         within  = 0.0044                                         min =          7
         between = 0.0051                                         avg =        7.0
         overall = 0.0036                                         max =          7
    
                                                    F(3,594)          =       3.39
    corr(u_i, Xb)  = -0.1410                        Prob > F          =     0.0177
    
                                       (Std. Err. adjusted for 595 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
             wks |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
              ms |   .2768482   .8401541     0.33   0.742    -1.373186    1.926882
             exp |   .2340076   .0963688     2.43   0.015     .0447426    .4232727
            exp2 |  -.0060151   .0020082    -3.00   0.003    -.0099591   -.0020711
           _cons |   45.03432   1.124704    40.04   0.000     42.82544     47.2432
    -------------+----------------------------------------------------------------
         sigma_u |  3.3129911
         sigma_e |  4.2495327
             rho |  .37803073   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    .
    .
    . display "CASE II"
    CASE II
    
    . xtivreg lwage exp exp2 (wks = ms), fe first vce(robust)
    
    First-stage within regression
    
    Fixed-effects (within) regression               Number of obs     =      4,165
    Group variable: id                              Number of groups  =        595
    
    R-sq:                                           Obs per group:
         within  = 0.0044                                         min =          7
         between = 0.0051                                         avg =        7.0
         overall = 0.0036                                         max =          7
    
                                                    F(3,594)          =       3.39
    corr(u_i, Xb)  = -0.1410                        Prob > F          =     0.0177
    
                                       (Std. Err. adjusted for 595 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
             wks |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             exp |   .2340076   .0963688     2.43   0.015     .0447426    .4232727
            exp2 |  -.0060151   .0020082    -3.00   0.003    -.0099591   -.0020711
              ms |   .2768482   .8401541     0.33   0.742    -1.373186    1.926882
           _cons |   45.03432   1.124704    40.04   0.000     42.82544     47.2432
    -------------+----------------------------------------------------------------
         sigma_u |  3.3129911
         sigma_e |  4.2495327
             rho |  .37803073   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    
    Fixed-effects (within) IV regression            Number of obs     =      4,165
    Group variable: id                              Number of groups  =        595
    
    R-sq:                                           Obs per group:
         within  =      .                                         min =          7
         between = 0.0172                                         avg =        7.0
         overall = 0.0284                                         max =          7
    
    
                                                    Wald chi2(3)      =   12295.89
    corr(u_i, Xb)  = -0.8499                        Prob > chi2       =     0.0000
    
                                       (Std. Err. adjusted for 595 clusters in id)
    ------------------------------------------------------------------------------
                 |               Robust
           lwage |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             wks |  -.1149742   .3707276    -0.31   0.756    -.8415868    .6116385
             exp |   .1408101   .0902921     1.56   0.119    -.0361591    .3177794
            exp2 |  -.0011207   .0022925    -0.49   0.625    -.0056139    .0033726
           _cons |    9.83932   16.75004     0.59   0.557    -22.99015    42.66879
    -------------+----------------------------------------------------------------
         sigma_u |  1.0980369
         sigma_e |  .51515503
             rho |  .81959748   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    Instrumented:   wks
    Instruments:    exp exp2 ms
    ------------------------------------------------------------------------------
    I get the same F-statistic in both cases. Please type -update all- and run your code again.

    Comment


    • #3
      Thanks Enrique Pinzon (StataCorp) ... yes, after -update all-, I get the same F-statistic.

      Also, another advantage is that the robust standard errors for hand-written first-stage and --xtivreg-- first stage are now identical (before --update all--, robust SE for --xtivreg-- and hand-written first stage were different too).

      May I ask when (and when not) to use the official --xtivreg-- reported first-stage F-stats to test for "weak instrument" using critical values from Stock and Yogo (2005). I can think of a few cases:
      - one endogenous regressor, one instrument
      - one endogenous regressor, many instruments
      - multiple endogenous regressor, many instruments

      I have searched all over Stata documentation but have not been able to get any details that would allow me to decide.

      On to --xtivreg2--:

      I am still not sure why the F-statistic from --xtivreg2-- is different. I understand that --xtivreg2-- is not a Stata program but hopefully you could comment ...

      Thanks for your help.

      Comment


      • #4
        Baykaar,

        What Stock and Yogo did does not cover the case of robust standard errors. A recent paper in the Stata Journal deals with this case and it might be a good place to look (Pflueger and Wang 2015 "A robust test for weak instruments in Stata"). With regard to -xtivreg2-, I do not have enough knowledge to be able to help out.

        Comment


        • #5
          Thanks Enrique Pinzon (StataCorp) ....

          Unfortunately, I cannot use --weakivtest-- in Pflueger and Wang (2015) with --xtivreg-- but I will read through the Montiel Olea and Pflueger (2013) paper to figure out what the correct critical value should be ...

          On first-stage F-stat with --xtivreg--

          The first-stage F-stat for is substantially higher if I estimate them without using --vce(robust)-- so I assume that the first-stage F-stat reported in the first-stage for --xtivreg, vce(robust)-- are corrected for heteroskedasticity and serial correlation. Is this a correct assumption?


          Code:
          use http://cameron.econ.ucdavis.edu/musbook/mus08psidextract.dta
          xtset id t
          cls
          display "with robust SE"
          xtivreg lwage exp exp2 (wks = ms), fe first vce(robust)
          
          display "without robust SE, MUCH larger F-stat"
          xtivreg lwage exp exp2 (wks = ms), fe first


          Comment


          • #6
            Baykaar,

            Yes, the robust standard errors control for heteroskedasticity and intra-group correlation.

            Comment

            Working...
            X