Announcement

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

  • Find first stage F-stats under xtivreg with factor variables (so no xtoverid)

    It seems to be well-documented (here: https://www.statalist.org/forums/for...port-fvvarlist or here: https://www.stata.com/statalist/arch.../msg00707.html) that xtoverid does not work when factor variable are included in a regression using xtivreg.

    I am using factor variables in an xtivreg regression, and I would like to know the first stage F-stat for my excluded variables. Is there any way to do this w/out using xtoverid?

    If there is no post-estimation command that works to do this, I can of course separately run what I think is the 1st stage, and test my excluded variables myself. From page 20 of the manual (https://www.stata.com/manuals/xtxtivreg.pdf) it looks like I would first (a) remove all fixed effects using xtreg, then (b) run a 2SLS regression of my 1st stage using ivreg or ivreg2. Does anyone know if this is indeed the best manual approximation of the first stage of xtivreg?
    Last edited by Leah Bevis; 31 Dec 2019, 12:25. Reason: xtreg, xtoverid, factor

  • #2
    No need to program this for fixed effects IV regression. Install ivreghdfe from SSC which supports factor variables. The test is part of the default output.

    Code:
    webuse nlswork
    xtivreg ln_w age not_smsa c.age#c.age (tenure = union south), fe
    ivreghdfe ln_w age not_smsa c.age#c.age (tenure = union south), a(idcode)

    Res.:
    Code:
    . ivreghdfe ln_w age not_smsa c.age#c.age (tenure = union south), a(idcode)
    (dropped 673 singleton observations)
    (MWFE estimator converged in 1 iterations)
    
    IV (2SLS) estimation
    --------------------
    
    Estimates efficient for homoskedasticity only
    Statistics consistent for homoskedasticity only
    
                                                          Number of obs =    18334
                                                          F(  4, 14869) =    74.14
                                                          Prob > F      =   0.0000
    Total (centered) SS     =  1119.473248                Centered R2   =  -4.2766
    Total (uncentered) SS   =  1119.473248                Uncentered R2 =  -4.2766
    Residual SS             =  5907.007821                Root MSE      =    .6303
    
    ------------------------------------------------------------------------------
         ln_wage |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
          tenure |   .2403531   .0373419     6.44   0.000     .1671583    .3135478
             age |   .0118437   .0090032     1.32   0.188    -.0058037    .0294912
        not_smsa |  -.0167178   .0339236    -0.49   0.622    -.0832123    .0497767
                 |
     c.age#c.age |  -.0012145   .0001968    -6.17   0.000    -.0016003   -.0008286
    ------------------------------------------------------------------------------
    Underidentification test (Anderson canon. corr. LM statistic):          52.345
                                                       Chi-sq(2) P-val =    0.0000
    ------------------------------------------------------------------------------
    Weak identification test (Cragg-Donald Wald F statistic):               21.286
    Stock-Yogo weak ID test critical values: 10% maximal IV size             19.93
                                             15% maximal IV size             11.59
                                             20% maximal IV size              8.75
                                             25% maximal IV size              7.25
    Source: Stock-Yogo (2005).  Reproduced by permission.
    ------------------------------------------------------------------------------
    Sargan statistic (overidentification test of all instruments):           1.691
                                                       Chi-sq(1) P-val =    0.1935
    ------------------------------------------------------------------------------
    Instrumented:         tenure
    Included instruments: age not_smsa c.age#c.age
    Excluded instruments: union south
    Partialled-out:       _cons
                          nb: total SS, model F and R2s are after partialling-out;
                              any small-sample adjustments include partialled-out
                              variables in regressor count K
    ------------------------------------------------------------------------------
    
    Absorbed degrees of freedom:
    -----------------------------------------------------+
     Absorbed FE | Categories  - Redundant  = Num. Coefs |
    -------------+---------------------------------------|
          idcode |      3461           0        3461     |
    -----------------------------------------------------+
    
    .

    Comment

    Working...
    X