Announcement

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

  • How to include regional-specific time trends in the FE-IV model using the code ivreghdfe?

    Dear Statalisters:

    I want to control for regional-specific time trends in my FE-IV model (individual fixed effects and standard errors are cluster at individual level), so I tried several ways of coding:

    i).
    Code:
    ivreghdfe y (x=z) c.year##i.region, absorb(pid) cluster(pid)
    ii).
    Code:
    ivreghdfe y (x=z), absorb (c.year##i.region) cluster(pid)
    For the male sample, these two codes report the same results, however, for the student sample they report different results.

    I further used xtivreg, the code is as below:

    Code:
    xtset pid year
    xtivreg y (x=z) c.year##i.region, vce(cluster pid) fe
    xtivreg reposts result different from the results from both above two codes.

    Can anyone tell me how I can correctly include regional-specific time trends in the FE-IV model?
    Thank you very much!!
    Last edited by Yanni Shen; 08 Aug 2022, 00:40.

  • #2
    ivreghdfe is from SSC (FAQ Advice #12).

    c.year##i.region
    This includes year as a continuous variable, regional dummies and region-specific time trends and is equivalent to


    Code:
    c.year i.region c.year#i.region
    [.] So the region-specific time trends are given by just

    Code:
    c.year#i.region

    Code:
    ivreghdfe y (x=z) c.year##i.region, absorb(pid) cluster(pid)
    ii).
    Code:
    ivreghdfe y (x=z), absorb(c.year##i.region) cluster(pid)
    For the male sample, these two codes report the same results, however, for the student sample they report different results.

    The models are completely different. In one, you have individual effects captured by absorbing the variable pid whereas in the second, you do not absorb this variable. Only when the omitted variable within -absorb()- is collinear with the included variables will you get the same results.

    Comment


    • #3
      Andrew Musau Thank you soooo much for your help!!

      Now I get the idea that the code to include region-specific time trends is c.year#i.region rather than c.year##i.provcd!

      ->The models are completely different. In one, you have individual effects captured by absorbing the variable pid whereas in the second, you do not absorb this variable.
      I'm sorry for my mistyping. The second model is
      Code:
      ivreghdfe y (x=z), absorb(pid c.year##i.region) cluster(pid)
      It includes individual fixed effects as in model 1, the only difference is whether put c.year##i.region in the parentheses of absorb or out of the parentheses.
      Because I don't know the difference, so I tried both: for the male sample, these two report the same results, however, for the student sample they report different results.
      I find this weird and don't know how to explain it... It would be really appreciated if you can help me with this, thanks!!

      Comment


      • #4
        I think you need to show the entire Stata output for both estimations. Place these within CODE delimiters.

        Comment


        • #5
          Andrew Musau Thank you so much!

          Results when put c.wave##i.provcd within the parentheses of absorb
          Code:
          ivreghdfe bmi (inttimeg4=bdbd) $ctvar if student==1, absorb(pid c.wave##i.provcd) cluster(pid)
          (dropped 836 singleton observations)
          (MWFE estimator converged in 49 iterations)
          
          IV (2SLS) estimation
          --------------------
          
          Estimates efficient for homoskedasticity only
          Statistics robust to heteroskedasticity and clustering on pid
          
          Number of clusters (pid) =         299                Number of obs =      622
                                                                F( 14,   298) =     1.90
                                                                Prob > F      =   0.0260
          Total (centered) SS     =  351.3946003                Centered R2   =   0.0168
          Total (uncentered) SS   =  351.3946003                Uncentered R2 =   0.0168
          Residual SS             =  345.4887106                Root MSE      =    .7862
          
          ------------------------------------------------------------------------------
                       |               Robust
                   bmi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
             inttimeg4 |  -.7185779   9.444969    -0.08   0.939    -19.30587    17.86871
                 age20 |          0  (omitted)
                 age30 |   1.095523   3.851325     0.28   0.776    -6.483718    8.674763
                 age40 |   2.379844   4.405836     0.54   0.589    -6.290649    11.05034
                  educ |  -.0606307   .3501335    -0.17   0.863    -.7496782    .6284169
               married |  -1.245148   1.223803    -1.02   0.310    -3.653539    1.163242
            familysize |    .063717   .2207936     0.29   0.773    -.3707952    .4982292
                 rural |   -.500087   .7608098    -0.66   0.511    -1.997328    .9971537
                  work |   .0958174   .9021097     0.11   0.915    -1.679495     1.87113
                  linc |  -.0016748   .1090295    -0.02   0.988    -.2162401    .2128904
                   GDP |  -.0000801   .0004231    -0.19   0.850    -.0009127    .0007525
              unemploy |  -.7969562   .8894302    -0.90   0.371    -2.547316    .9534037
               finbudg |   .0000895   .0002728     0.33   0.743    -.0004474    .0006264
                over65 |   .1406953   .3412964     0.41   0.680    -.5309612    .8123518
                hltins |   .0000403   .0001281     0.31   0.753    -.0002118    .0002924
          ------------------------------------------------------------------------------
          Underidentification test (Kleibergen-Paap rk LM statistic):              0.295
                                                             Chi-sq(1) P-val =    0.5871
          ------------------------------------------------------------------------------
          Weak identification test (Cragg-Donald Wald F statistic):                0.440
                                   (Kleibergen-Paap rk Wald F statistic):          0.265
          Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                                   15% maximal IV size              8.96
                                                   20% maximal IV size              6.66
                                                   25% maximal IV size              5.53
          Source: Stock-Yogo (2005).  Reproduced by permission.
          NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
          ------------------------------------------------------------------------------
          Warning: estimated covariance matrix of moment conditions not of full rank.
                   overidentification statistic not reported, and standard errors and
                   model tests should be interpreted with caution.
          Possible causes:
                   number of clusters insufficient to calculate robust covariance matrix
                   singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
          partial option may address problem.
          ------------------------------------------------------------------------------
          Collinearities detected among instruments: 1 instrument(s) dropped
          Instrumented:         inttimeg4
          Included instruments: age20 age30 age40 educ married familysize rural work linc
                                GDP unemploy finbudg over65 hltins
          Excluded instruments: bdbd
          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 |
          ---------------+---------------------------------------|
                     pid |       299         299           0    *|
                  provcd |        25           1          24     |
           provcd#c.wave |        25           0          25    ?|
          -------------------------------------------------------+
          ? = number of redundant parameters may be higher
          * = FE nested within cluster; treated as redundant for DoF computation

          Results when put c.wave##i.provcd out of the parentheses of absorb
          Code:
          ivreghdfe bmi (inttimeg4=bdbd) $ctvar c.wave##i.provcd if student==1, absorb(pid ) cluster(pid)
          (dropped 834 singleton observations)
          Warning - collinearities detected
          Vars dropped:       65.provcd#c.wave
          (MWFE estimator converged in 1 iterations)
          
          IV (2SLS) estimation
          --------------------
          
          Estimates efficient for homoskedasticity only
          Statistics robust to heteroskedasticity and clustering on pid
          
          Number of clusters (pid) =         300                Number of obs =      624
                                                                F( 60,   299) =  7.0e+06
                                                                Prob > F      =   0.0000
          Total (centered) SS     =  409.6982207                Centered R2   =  -0.3873
          Total (uncentered) SS   =  409.6982207                Uncentered R2 =  -0.3873
          Residual SS             =  568.3777212                Root MSE      =    1.005
          
          ---------------------------------------------------------------------------------------------------
                                            |               Robust
                                        bmi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          ----------------------------------+----------------------------------------------------------------
                                  inttimeg4 |  -2.776917   54.59785    -0.05   0.959    -110.2216    104.6678
                                      age20 |          0   3.158351     0.00   1.000    -6.215412    6.215412
                                      age30 |   1.684808   2.765546     0.61   0.543    -3.757592    7.127208
                                      age40 |   3.485824          .        .       .            .           .
                                       educ |   .0344442   1.562028     0.02   0.982    -3.039518    3.108406
                                    married |   -1.37917   3.685965    -0.37   0.709     -8.63289    5.874551
                                 familysize |   .0730965   .2328119     0.31   0.754     -.385061    .5312541
                                      rural |  -.6074469   .9691196    -0.63   0.531    -2.514606    1.299712
                                       work |  -.1189428   .8542204    -0.14   0.889    -1.799988    1.562103
                                       linc |   .0207765   .3733503     0.06   0.956    -.7139508    .7555037
                                        GDP |  -.0000893   .0008054    -0.11   0.912    -.0016742    .0014956
                                   unemploy |  -.6515151   5.990465    -0.11   0.913    -12.44033     11.1373
                                    finbudg |    .000234   .0039475     0.06   0.953    -.0075343    .0080024
                                     over65 |   .0582966    .819276     0.07   0.943    -1.553981    1.670574
                                     hltins |   .0000541   .0005797     0.09   0.926    -.0010868    .0011949
                                       wave |   .1387621    .792673     0.18   0.861    -1.421163    1.698687
                                            |
                                     provcd |
                                   Beijing  |          0  (empty)
                                   Tianjin  |          0  (omitted)
                                     Hebei  |          0  (omitted)
                                    Shanxi  |          0  (omitted)
                                  Liaoning  |          0  (omitted)
                                     Jilin  |          0  (omitted)
                              Heilongjiang  |          0  (omitted)
                                  Shanghai  |          0  (omitted)
                                   Jiangsu  |          0  (omitted)
                                  Zhejiang  |          0  (omitted)
                                     Anhui  |          0  (omitted)
                                    Fujian  |          0  (omitted)
                                   Jiangxi  |          0  (omitted)
                                  Shandong  |          0  (omitted)
                                     Henan  |          0  (omitted)
                                     Hubei  |          0  (omitted)
                                     Hunan  |          0  (omitted)
                                 Guangdong  |          0  (omitted)
          Guangxi Zhuang Autonomous Region  |          0  (omitted)
                                 Chongqing  |          0  (omitted)
                                   Sichuan  |          0  (omitted)
                                   Guizhou  |          0  (omitted)
                                    Yunnan  |          0  (omitted)
                                   Shaanxi  |          0  (omitted)
                                     Gansu  |          0  (omitted)
          Xinjiang Uygur Autonomous Region  |  -5.053061   9.097552    -0.56   0.579     -22.9564    12.85028
                                            |
                              provcd#c.wave |
                                   Beijing  |          0  (empty)
                                   Tianjin  |  -.0009207   .0016891    -0.55   0.586    -.0042448    .0024034
                                     Hebei  |  -.0022754    .015141    -0.15   0.881    -.0320718     .027521
                                    Shanxi  |  -.0017281   .0146236    -0.12   0.906    -.0305064    .0270502
                                  Liaoning  |  -.0020004   .0110623    -0.18   0.857    -.0237702    .0197693
                                     Jilin  |   .1751903   4.111847     0.04   0.966    -7.916635    8.267016
                              Heilongjiang  |    -.00203   .0030207    -0.67   0.502    -.0079746    .0039145
                                  Shanghai  |  -.0009557   .0052536    -0.18   0.856    -.0112944    .0093831
                                   Jiangsu  |   4.27e-06   .0132042     0.00   1.000    -.0259807    .0259893
                                  Zhejiang  |  -.0019899   .0010138    -1.96   0.051    -.0039849    5.12e-06
                                     Anhui  |   -.001627   .0024569    -0.66   0.508     -.006462     .003208
                                    Fujian  |  -.0003294    .029397    -0.01   0.991    -.0581806    .0575219
                                   Jiangxi  |  -.0016595   .0043595    -0.38   0.704    -.0102387    .0069197
                                  Shandong  |   -.001501   .0300378    -0.05   0.960    -.0606132    .0576113
                                     Henan  |  -.0016981   .0278318    -0.06   0.951    -.0564692     .053073
                                     Hubei  |  -.0018102   .0041874    -0.43   0.666    -.0100507    .0064303
                                     Hunan  |  -.0023242   .0054073    -0.43   0.668    -.0129654    .0083169
                                 Guangdong  |    .139863   .5158146     0.27   0.786    -.8752238     1.15495
          Guangxi Zhuang Autonomous Region  |  -.0017409    .003177    -0.55   0.584     -.007993    .0045112
                                 Chongqing  |  -.0005156   .0220691    -0.02   0.981     -.043946    .0429148
                                   Sichuan  |  -.0017686   .0272625    -0.06   0.948    -.0554193     .051882
                                   Guizhou  |  -.5974209   1.442167    -0.41   0.679    -3.435504    2.240662
                                    Yunnan  |   .0539856   1.766206     0.03   0.976    -3.421784    3.529755
                                   Shaanxi  |   -.001436   .0082411    -0.17   0.862    -.0176539    .0147819
                                     Gansu  |  -.0025182   .0025988    -0.97   0.333    -.0076325    .0025961
          Xinjiang Uygur Autonomous Region  |          0  (empty)
          ---------------------------------------------------------------------------------------------------
          Underidentification test (Kleibergen-Paap rk LM statistic):              0.395
                                                             Chi-sq(1) P-val =    0.5299
          ------------------------------------------------------------------------------
          Weak identification test (Cragg-Donald Wald F statistic):                0.844
                                   (Kleibergen-Paap rk Wald F statistic):          0.352
          Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                                   15% maximal IV size              8.96
                                                   20% maximal IV size              6.66
                                                   25% maximal IV size              5.53
          Source: Stock-Yogo (2005).  Reproduced by permission.
          NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
          ------------------------------------------------------------------------------
          Warning: estimated covariance matrix of moment conditions not of full rank.
                   overidentification statistic not reported, and standard errors and
                   model tests should be interpreted with caution.
          Possible causes:
                   number of clusters insufficient to calculate robust covariance matrix
                   singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
          partial option may address problem.
          ------------------------------------------------------------------------------
          Collinearities detected among instruments: 5 instrument(s) dropped
          Instrumented:         inttimeg4
          Included instruments: age20 age30 age40 educ married familysize rural work linc
                                GDP unemploy finbudg over65 hltins wave 12.provcd
                                13.provcd 14.provcd 21.provcd 22.provcd 23.provcd
                                31.provcd 32.provcd 33.provcd 34.provcd 35.provcd
                                36.provcd 37.provcd 41.provcd 42.provcd 43.provcd
                                44.provcd 45.provcd 50.provcd 51.provcd 52.provcd
                                53.provcd 61.provcd 62.provcd 65.provcd 12.provcd#c.wave
                                13.provcd#c.wave 14.provcd#c.wave 21.provcd#c.wave
                                22.provcd#c.wave 23.provcd#c.wave 31.provcd#c.wave
                                32.provcd#c.wave 33.provcd#c.wave 34.provcd#c.wave
                                35.provcd#c.wave 36.provcd#c.wave 37.provcd#c.wave
                                41.provcd#c.wave 42.provcd#c.wave 43.provcd#c.wave
                                44.provcd#c.wave 45.provcd#c.wave 50.provcd#c.wave
                                51.provcd#c.wave 52.provcd#c.wave 53.provcd#c.wave
                                61.provcd#c.wave 62.provcd#c.wave
          Excluded instruments: bdbd
          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
          Dropped collinear:    65.provcd#c.wave
          ------------------------------------------------------------------------------
          
          Absorbed degrees of freedom:
          -----------------------------------------------------+
           Absorbed FE | Categories  - Redundant  = Num. Coefs |
          -------------+---------------------------------------|
                   pid |       300         300           0    *|
          -----------------------------------------------------+
          * = FE nested within cluster; treated as redundant for DoF computation

          Comment


          • #6
            You can only absorb indicators (aka dummy variables). In this case, you are absorbing some continuous variables which is not correct.

            c.wave##i.provcd
            is equivalent to

            c.wave i.provcd c.wave#i.provcd
            and therefore you can only absorb "i.provcd" in this instance. Therefore, you should obtain the same results from

            ivreghdfe bmi (inttimeg4=bdbd) $ctvar c.wave##i.provcd if student==1, absorb(pid) cluster(pid)
            and

            Code:
            ivreghdfe bmi (inttimeg4=bdbd) $ctvar c.wave c.wave#i.provcd ///
            if student==1, absorb(pid i.provcd) cluster(pid)

            Comment


            • #7
              Andrew Musau Thank you so much! It really makes sense to me and I totally agree!

              However, the code you told me
              Code:
               
               ivreghdfe bmi (inttimeg4=bdbd) $ctvar c.wave c.wave#i.provcd /// if student==1, absorb(pid i.provcd) cluster(pid)
              does not have the same result (see below) as the code
              ivreghdfe bmi (inttimeg4=bdbd) $ctvar c.wave##i.provcd if student==1, absorb(pid) cluster(pid)
              Instead, it has the same results as the code
              ivreghdfe bmi (inttimeg4=bdbd) $ctvar if student==1, absorb(pid c.wave##i.provcd) cluster(pid)

              Code:
              ivreghdfe bmi (inttimeg4=bdbd) $ctvar c.wave c.wave#i.provcd if student==1, absorb(pid provcd) cluste
              > r(pid)
              (dropped 836 singleton observations)
              (MWFE estimator converged in 26 iterations)
              
              IV (2SLS) estimation
              --------------------
              
              Estimates efficient for homoskedasticity only
              Statistics robust to heteroskedasticity and clustering on pid
              
              Number of clusters (pid) =         299                Number of obs =      622
                                                                    F( 39,   298) =  3.2e+06
                                                                    Prob > F      =   0.0000
              Total (centered) SS     =  388.4740314                Centered R2   =   0.1107
              Total (uncentered) SS   =  388.4740314                Uncentered R2 =   0.1107
              Residual SS             =  345.4887088                Root MSE      =    .7862
              
              ---------------------------------------------------------------------------------------------------
                                                |               Robust
                                            bmi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
              ----------------------------------+----------------------------------------------------------------
                                      inttimeg4 |  -.7185779   9.444973    -0.08   0.939    -19.30587    17.86872
                                          age20 |  -2.379844          .        .       .            .           .
                                          age30 |  -1.284322   3.851326    -0.33   0.739    -8.863563     6.29492
                                          age40 |          0   4.405837     0.00   1.000    -8.670495    8.670495
                                           educ |  -.0606307   .3501337    -0.17   0.863    -.7496785    .6284171
                                        married |  -1.245148   1.223803    -1.02   0.310    -3.653539    1.163242
                                     familysize |    .063717   .2207937     0.29   0.773    -.3707954    .4982295
                                          rural |   -.500087   .7608104    -0.66   0.511    -1.997329    .9971549
                                           work |   .0958174   .9021101     0.11   0.915    -1.679496    1.871131
                                           linc |  -.0016748   .1090295    -0.02   0.988    -.2162402    .2128905
                                            GDP |  -.0000801   .0004231    -0.19   0.850    -.0009127    .0007525
                                       unemploy |  -.7969562   .8894304    -0.90   0.371    -2.547316    .9534041
                                        finbudg |   .0000895   .0002728     0.33   0.743    -.0004474    .0006264
                                         over65 |   .1406953   .3412965     0.41   0.680    -.5309613     .812352
                                         hltins |   .0000403   .0001281     0.31   0.753    -.0002118    .0002924
                                           wave |   .1298071    1.12018     0.12   0.908    -2.074658    2.334273
                                                |
                                  provcd#c.wave |
                                       Beijing  |          0  (empty)
                                       Tianjin  |   .2417993    2.45991     0.10   0.922    -4.599196    5.082795
                                         Hebei  |  -.0359528   .9995317    -0.04   0.971    -2.002988    1.931082
                                        Shanxi  |   .2280301   1.306942     0.17   0.862    -2.343976    2.800036
                                      Liaoning  |  -.2542909   1.986464    -0.13   0.898    -4.163565    3.654983
                                         Jilin  |   .4326121   2.332894     0.19   0.853    -4.158422    5.023647
                                  Heilongjiang  |  -.1786883   1.038057    -0.17   0.863    -2.221539    1.864162
                                      Shanghai  |  -.0718417   .1859726    -0.39   0.700    -.4378278    .2941443
                                       Jiangsu  |      .3367   1.399953     0.24   0.810    -2.418347    3.091747
                                      Zhejiang  |  -.4479951   1.621073    -0.28   0.782    -3.638197    2.742207
                                         Anhui  |  -.0695772   .4891784    -0.14   0.887    -1.032259    .8931047
                                        Fujian  |   .6924215   1.068973     0.65   0.518    -1.411272    2.796115
                                       Jiangxi  |   .4399599   .8643629     0.51   0.611    -1.261069    2.140989
                                      Shandong  |   .2236301   .2604126     0.86   0.391    -.2888506    .7361108
                                         Henan  |   .1750232   .1749484     1.00   0.318    -.1692677    .5193141
                                         Hubei  |  -.1453725   .4978909    -0.29   0.771      -1.1252    .8344551
                                         Hunan  |  -.4561365   .5596887    -0.81   0.416     -1.55758    .6453065
                                     Guangdong  |    .402145   1.762763     0.23   0.820    -3.066897    3.871187
              Guangxi Zhuang Autonomous Region  |  -.0330182   .3892202    -0.08   0.932    -.7989867    .7329502
                                     Chongqing  |   .1413529   .9334656     0.15   0.880    -1.695667    1.978373
                                       Sichuan  |   .1521578   .2509067     0.61   0.545    -.3416157    .6459313
                                       Guizhou  |  -.5232365   1.029698    -0.51   0.612    -2.549638    1.503165
                                        Yunnan  |   .1415563   .9093735     0.16   0.876    -1.648051    1.931164
                                       Shaanxi  |  -.1347621   1.644105    -0.08   0.935    -3.370289    3.100765
                                         Gansu  |   .1255934   .9566727     0.13   0.896    -1.757097    2.008284
              ---------------------------------------------------------------------------------------------------
              Underidentification test (Kleibergen-Paap rk LM statistic):              0.295
                                                                 Chi-sq(1) P-val =    0.5871
              ------------------------------------------------------------------------------
              Weak identification test (Cragg-Donald Wald F statistic):                0.440
                                       (Kleibergen-Paap rk Wald F statistic):          0.265
              Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                                       15% maximal IV size              8.96
                                                       20% maximal IV size              6.66
                                                       25% maximal IV size              5.53
              Source: Stock-Yogo (2005).  Reproduced by permission.
              NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
              ------------------------------------------------------------------------------
              Warning: estimated covariance matrix of moment conditions not of full rank.
                       overidentification statistic not reported, and standard errors and
                       model tests should be interpreted with caution.
              Possible causes:
                       number of clusters insufficient to calculate robust covariance matrix
                       singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
              partial option may address problem.
              ------------------------------------------------------------------------------
              Collinearities detected among instruments: 1 instrument(s) dropped
              Instrumented:         inttimeg4
              Included instruments: age20 age30 age40 educ married familysize rural work linc
                                    GDP unemploy finbudg over65 hltins wave 12.provcd#c.wave
                                    13.provcd#c.wave 14.provcd#c.wave 21.provcd#c.wave
                                    22.provcd#c.wave 23.provcd#c.wave 31.provcd#c.wave
                                    32.provcd#c.wave 33.provcd#c.wave 34.provcd#c.wave
                                    35.provcd#c.wave 36.provcd#c.wave 37.provcd#c.wave
                                    41.provcd#c.wave 42.provcd#c.wave 43.provcd#c.wave
                                    44.provcd#c.wave 45.provcd#c.wave 50.provcd#c.wave
                                    51.provcd#c.wave 52.provcd#c.wave 53.provcd#c.wave
                                    61.provcd#c.wave 62.provcd#c.wave
              Excluded instruments: bdbd
              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 |
              -------------+---------------------------------------|
                       pid |       299         299           0    *|
                    provcd |        25           1          24     |
              -----------------------------------------------------+
              * = FE nested within cluster; treated as redundant for DoF computation

              Comment


              • #8
                Andrew Musau And weirdly, I find the c.wave#i.provcd have same result with c.wave##i.provcd when they are not in the parentheses of absorb

                Code:
                ivreghdfe bmi (inttimeg4=bdbd) $ctvar c.wave#i.provcd if student==1, absorb(pid) cluster(pid)
                (dropped 834 singleton observations)
                (MWFE estimator converged in 1 iterations)
                
                IV (2SLS) estimation
                --------------------
                
                Estimates efficient for homoskedasticity only
                Statistics robust to heteroskedasticity and clustering on pid
                
                Number of clusters (pid) =         300                Number of obs =      624
                                                                      F( 40,   299) =  9113.71
                                                                      Prob > F      =   0.0000
                Total (centered) SS     =  409.6982207                Centered R2   =  -0.3870
                Total (uncentered) SS   =  409.6982207                Uncentered R2 =  -0.3870
                Residual SS             =   568.236899                Root MSE      =    .9873
                
                ---------------------------------------------------------------------------------------------------
                                                  |               Robust
                                              bmi |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                ----------------------------------+----------------------------------------------------------------
                                        inttimeg4 |  -2.775984   7.302772    -0.38   0.704    -17.14733    11.59536
                                            age20 |          0   2.413202     0.00   1.000    -4.749013    4.749013
                                            age30 |   1.684723   1.615983     1.04   0.298    -1.495418    4.864864
                                            age40 |   3.485781   1.685878     2.07   0.040     .1680915    6.803471
                                             educ |   .0344186   .2408387     0.14   0.886     -.439535    .5083721
                                          married |  -1.379109   1.241377    -1.11   0.267    -3.822053    1.063834
                                       familysize |   .0730943   .1727982     0.42   0.673    -.2669604    .4131489
                                            rural |  -.6074298   .3659925    -1.66   0.098    -1.327677    .1128177
                                             work |  -.1189358   .5836753    -0.20   0.839    -1.267568    1.029696
                                             linc |   .0207704   .0663176     0.31   0.754    -.1097381    .1512788
                                              GDP |  -.0000893   .0001186    -0.75   0.452    -.0003227    .0001442
                                         unemploy |  -.6514161   .9175017    -0.71   0.478    -2.456995    1.154163
                                          finbudg |    .000234   .0006006     0.39   0.697     -.000948     .001416
                                           over65 |   .0582852   .1863277     0.31   0.755    -.3083947     .424965
                                           hltins |   .0000541   .0001035     0.52   0.602    -.0001497    .0002578
                                                  |
                                    provcd#c.wave |
                                         Beijing  |   .1387726   .1896726     0.73   0.465    -.2344897    .5120348
                                         Tianjin  |   .1378519   .1893205     0.73   0.467    -.2347176    .5104213
                                           Hebei  |    .136497   .1880217     0.73   0.468    -.2335164    .5065104
                                          Shanxi  |   .1370443   .1880873     0.73   0.467    -.2330982    .5071868
                                        Liaoning  |    .136772   .1885574     0.73   0.469    -.2342957    .5078397
                                           Jilin  |   .3140331   .7840028     0.40   0.689    -1.228829    1.856895
                                    Heilongjiang  |   .1367426   .1891392     0.72   0.470    -.2354701    .5089552
                                        Shanghai  |    .137817   .1900973     0.72   0.469    -.2362811    .5119152
                                         Jiangsu  |   .1387767   .1886825     0.74   0.463    -.2325373    .5100906
                                        Zhejiang  |   .1367827   .1894798     0.72   0.471    -.2361002    .5096656
                                           Anhui  |   .1371456   .1893546     0.72   0.469    -.2354909     .509782
                                          Fujian  |   .1384428   .1870715     0.74   0.460    -.2297007    .5065862
                                         Jiangxi  |   .1371131   .1889681     0.73   0.469    -.2347629     .508989
                                        Shandong  |   .1372712   .1871395     0.73   0.464    -.2310062    .5055485
                                           Henan  |    .137074   .1872195     0.73   0.465    -.2313608    .5055088
                                           Hubei  |   .1369624   .1891799     0.72   0.470    -.2353303     .509255
                                           Hunan  |   .1364485     .18968     0.72   0.472    -.2368284    .5097254
                                       Guangdong  |   .2786404   .4043806     0.69   0.491    -.5171521    1.074433
                Guangxi Zhuang Autonomous Region  |   .1370317   .1891182     0.72   0.469    -.2351397    .5092031
                                       Chongqing  |   .1382566   .1877651     0.74   0.462    -.2312518    .5077651
                                         Sichuan  |   .1370035   .1872924     0.73   0.465    -.2315747    .5055817
                                         Guizhou  |  -.4586245   .3661949    -1.25   0.211     -1.17927    .2620214
                                          Yunnan  |   .1927884   .4396925     0.44   0.661    -.6724955    1.058072
                                         Shaanxi  |   .1373368     .18997     0.72   0.470    -.2365108    .5111843
                                           Gansu  |   .1362544   .1894814     0.72   0.473    -.2366315    .5091404
                Xinjiang Uygur Autonomous Region  |   .1362687    .189569     0.72   0.473    -.2367897    .5093272
                ---------------------------------------------------------------------------------------------------
                Underidentification test (Kleibergen-Paap rk LM statistic):              0.395
                                                                   Chi-sq(1) P-val =    0.5299
                ------------------------------------------------------------------------------
                Weak identification test (Cragg-Donald Wald F statistic):                0.881
                                         (Kleibergen-Paap rk Wald F statistic):          0.367
                Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                                         15% maximal IV size              8.96
                                                         20% maximal IV size              6.66
                                                         25% maximal IV size              5.53
                Source: Stock-Yogo (2005).  Reproduced by permission.
                NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
                ------------------------------------------------------------------------------
                Warning: estimated covariance matrix of moment conditions not of full rank.
                         overidentification statistic not reported, and standard errors and
                         model tests should be interpreted with caution.
                Possible causes:
                         number of clusters insufficient to calculate robust covariance matrix
                         singleton dummy variable (dummy with one 1 and N-1 0s or vice versa)
                partial option may address problem.
                ------------------------------------------------------------------------------
                Collinearities detected among instruments: 1 instrument(s) dropped
                Instrumented:         inttimeg4
                Included instruments: age20 age30 age40 educ married familysize rural work linc
                                      GDP unemploy finbudg over65 hltins 11b.provcd#c.wave
                                      12.provcd#c.wave 13.provcd#c.wave 14.provcd#c.wave
                                      21.provcd#c.wave 22.provcd#c.wave 23.provcd#c.wave
                                      31.provcd#c.wave 32.provcd#c.wave 33.provcd#c.wave
                                      34.provcd#c.wave 35.provcd#c.wave 36.provcd#c.wave
                                      37.provcd#c.wave 41.provcd#c.wave 42.provcd#c.wave
                                      43.provcd#c.wave 44.provcd#c.wave 45.provcd#c.wave
                                      50.provcd#c.wave 51.provcd#c.wave 52.provcd#c.wave
                                      53.provcd#c.wave 61.provcd#c.wave 62.provcd#c.wave
                                      65.provcd#c.wave
                Excluded instruments: bdbd
                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 |
                -------------+---------------------------------------|
                         pid |       300         300           0    *|
                -----------------------------------------------------+
                * = FE nested within cluster; treated as redundant for DoF computation

                Comment


                • #9
                  However, the code you told me
                  Code:
                  ivreghdfe bmi (inttimeg4=bdbd) $ctvar c.wave c.wave#i.provcd /// if student==1, absorb(pid i.provcd) cluster(pid)
                  does not have the same result (see below) as the code
                  ivreghdfe bmi (inttimeg4=bdbd) $ctvar c.wave##i.provcd if student==1, absorb(pid) cluster(pid)
                  You have a lot of collinear variables. Make sure it is the same set of indicators being dropped across comparison models. For example, in one, age20 is dropped while in another, it's age40.

                  And weirdly, I find the c.wave#i.provcd have same result with c.wave##i.provcd when they are not in the parentheses of absorb
                  You can see that some indicators from the double hash specification are being dropped due to collinearity. Therefore, the net result is the same.


                  Comment


                  • #10
                    Andrew Musau Thank you very much for your kind reply.

                    I see! Thanks a lot!! Have a nice weekend!!

                    Comment

                    Working...
                    X