Announcement

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

  • Differing sample sizes, but same coefficients with xtivreg and xtivreg2

    Hi Everyone,

    I have an unbalanced panel of hospitals. I am trying to examine the impact of telehealth on hospital rating. When I run an xtivreg model

    xtivreg H_HSP_RATING_9_10 H_COMP_2_A_P newNetwrkMem logLicensedBeds CMI2 logAdmissions logTotOutpatVis PhysAndNursTot forprofit (OF1bTelehealthhistorical = Totalfacil RV ) , fe


    Fixed-effects (within) IV regression Number of obs = 6058
    Group variable: AHAID Number of groups = 2310

    R-sq: within = . Obs per group: min = 1
    between = 0.1717 avg = 2.6
    overall = 0.1576 max = 4

    Wald chi2(9) = 2.62e+06
    corr(u_i, Xb) = -0.0273 Prob > chi2 = 0.0000

    ------------------------------------------------------------------------------------------
    H_HSP_RATING_9_10 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
    -------------------------+----------------------------------------------------------------
    OF1bTelehealthhistorical | 1.927841 .5520274 3.49 0.000 .8458873 3.009795
    H_COMP_2_A_P | .655708 .0310748 21.10 0.000 .5948024 .7166135
    newNetwrkMem | .2702723 .2780665 0.97 0.331 -.274728 .8152727
    logLicensedBeds | .3527704 .7032932 0.50 0.616 -1.025659 1.7312
    CMI2 | .8622487 1.199664 0.72 0.472 -1.48905 3.213547
    logAdmissions | .0148941 .5895468 0.03 0.980 -1.140596 1.170385
    logTotOutpatVis | .1035788 .2985862 0.35 0.729 -.4816395 .6887971
    PhysAndNursTot | -.0008241 .0006443 -1.28 0.201 -.002087 .0004387
    forprofit | 2.486796 .9016759 2.76 0.006 .7195435 4.254048
    _cons | 6.959503 6.667382 1.04 0.297 -6.108325 20.02733
    -------------------------+----------------------------------------------------------------
    sigma_u | 7.0374608
    sigma_e | 3.395186
    rho | .81119256 (fraction of variance due to u_i)
    ------------------------------------------------------------------------------------------
    F test that all u_i=0: F(2309,3739) = 5.65 Prob > F = 0.0000
    ------------------------------------------------------------------------------------------
    Instrumented: OF1bTelehealthhistorical
    Instruments: H_COMP_2_A_P newNetwrkMem logLicensedBeds CMI2 logAdmissions
    logTotOutpatVis PhysAndNursTot forprofit Totalfacilityexpensesexcludin RV
    ------------------------------------------------------------------------------------------

    .
    I then ran a similar model to get the first stage results from xtivreg2

    xtivreg2 H_HSP_RATING_9_10 H_COMP_2_A_P newNetwrkMem logLicensedBeds CMI2 logAdmissions logTotOutpatVis PhysAndNursTot forprofit (OF1bTelehealthhistorical = Totalfacil RV ) , fe robust first small


    FIXED EFFECTS ESTIMATION
    ------------------------
    Number of groups = 1660 Obs per group: min = 2
    avg = 3.3
    max = 4

    First-stage regressions
    -----------------------

    Unable to display all first-stage regressions.
    There may be insufficient room to store results using -estimates store-,
    or names of endogenous regressors may be too long to store the results.
    Try dropping one or more estimation results using -estimates drop-,
    using the -savefprefix- option, or using shorter variable names.



    Summary results for first-stage regressions
    -------------------------------------------

    (Underid) (Weak id)
    Variable | F( 2, 3738) P-val | SW Chi-sq( 2) P-val | SW F( 2, 3738)
    OF1bTeleheal | 10.93 0.0000 | 21.91 0.0000 | 10.93

    NB: first-stage test statistics heteroskedasticity-robust

    Stock-Yogo weak ID F test critical values for single endogenous regressor:
    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.
    NB: Critical values are for i.i.d. errors only.

    Underidentification test
    Ho: matrix of reduced form coefficients has rank=K1-1 (underidentified)
    Ha: matrix has rank=K1 (identified)
    Kleibergen-Paap rk LM statistic Chi-sq(2)=18.73 P-val=0.0001

    Weak identification test
    Ho: equation is weakly identified
    Cragg-Donald Wald F statistic 13.70
    Kleibergen-Paap Wald rk F statistic 10.93

    Stock-Yogo weak ID test critical values for K1=1 and L1=2:
    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.
    NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.

    Weak-instrument-robust inference
    Tests of joint significance of endogenous regressors B1 in main equation
    Ho: B1=0 and orthogonality conditions are valid
    Anderson-Rubin Wald test F(2,3738)= 10.19 P-val=0.0000
    Anderson-Rubin Wald test Chi-sq(2)= 20.43 P-val=0.0000
    Stock-Wright LM S statistic Chi-sq(2)= 22.17 P-val=0.0000

    NB: Underidentification, weak identification and weak-identification-robust
    test statistics heteroskedasticity-robust

    Number of observations N = 5408
    Number of regressors K = 9
    Number of endogenous regressors K1 = 1
    Number of instruments L = 10
    Number of excluded instruments L1 = 2

    IV (2SLS) estimation
    --------------------

    Estimates efficient for homoskedasticity only
    Statistics robust to heteroskedasticity

    Number of obs = 5408
    F( 9, 3739) = 27.59
    Prob > F = 0.0000
    Total (centered) SS = 31581.08333 Centered R2 = -0.3648
    Total (uncentered) SS = 31581.08333 Uncentered R2 = -0.3648
    Residual SS = 43100.52916 Root MSE = 3.395

    ------------------------------------------------------------------------------------------
    | Robust
    H_HSP_RATING_9_10 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------------------+----------------------------------------------------------------
    OF1bTelehealthhistorical | 1.927841 .7168633 2.69 0.007 .5223598 3.333322
    H_COMP_2_A_P | .655708 .0490046 13.38 0.000 .5596297 .7517862
    newNetwrkMem | .2702723 .2737156 0.99 0.324 -.2663741 .8069188
    logLicensedBeds | .3527704 .7312045 0.48 0.630 -1.080828 1.786369
    CMI2 | .8622487 1.439348 0.60 0.549 -1.959734 3.684232
    logAdmissions | .0148941 .8592885 0.02 0.986 -1.669826 1.699614
    logTotOutpatVis | .1035788 .3254017 0.32 0.750 -.5344033 .741561
    PhysAndNursTot | -.0008241 .0005658 -1.46 0.145 -.0019335 .0002852
    forprofit | 2.486796 1.083747 2.29 0.022 .3620025 4.611589
    ------------------------------------------------------------------------------------------
    Underidentification test (Kleibergen-Paap rk LM statistic): 18.734
    Chi-sq(2) P-val = 0.0001
    ------------------------------------------------------------------------------
    Weak identification test (Cragg-Donald Wald F statistic): 13.699
    (Kleibergen-Paap rk Wald F statistic): 10.926
    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.
    NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
    ------------------------------------------------------------------------------
    Hansen J statistic (overidentification test of all instruments): 3.845
    Chi-sq(1) P-val = 0.0499
    ------------------------------------------------------------------------------
    Instrumented: OF1bTelehealthhistorical
    Included instruments: H_COMP_2_A_P newNetwrkMem logLicensedBeds CMI2
    logAdmissions logTotOutpatVis PhysAndNursTot forprofit
    Excluded instruments: Totalfacilityexpensesexcludin RV
    ------------------------------------------------------------------------------

    The coefficients are the same, but the number of groups is 1660, vastly differing from 2310 above. The total observations are also obviously different. My question is, what is the number of hospitals? Is 1660 or 2310 the right number to report? Further, the number of observations are different too (N*T), but how can the coefficients end up being the same?

  • #2
    There is a warning of 650 singletons being ignored. 1660+650 =2310. So, I am guessing the discrepancy is due to these singletons.

    Comment


    • #3
      No answer to your question, just a comment: You will notice that the output you present is hard to read. You should always not only put syntax but also output between code delimiters. If you don't know what that is and how to, see https://www.statalist.org/forums/for...andbox/1751531.

      Comment


      • #4
        Code:
        FIXED EFFECTS ESTIMATION
        ------------------------
        Number of groups =      1660                    Obs per group: min =         2
                                                                       avg =       3.3
                                                                       max =         4
        
        First-stage regressions
        -----------------------
        
        Unable to display all first-stage regressions.
        There may be insufficient room to store results using -estimates store-,
        or names of endogenous regressors may be too long to store the results.
        Try dropping one or more estimation results using -estimates drop-,
        using the -savefprefix- option, or using shorter variable names.
        
        
        
        Summary results for first-stage regressions
        -------------------------------------------
        
                                                   (Underid)            (Weak id)
        Variable     | F(  2,  3738)  P-val | SW Chi-sq(  2) P-val | SW F(  2,  3738)
        OF1bTeleheal |      10.93    0.0000 |       21.91   0.0000 |       10.93
        
        NB: first-stage test statistics heteroskedasticity-robust
        
        Stock-Yogo weak ID F test critical values for single endogenous regressor:
                                           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.
        NB: Critical values are for i.i.d. errors only.
        
        Underidentification test
        Ho: matrix of reduced form coefficients has rank=K1-1 (underidentified)
        Ha: matrix has rank=K1 (identified)
        Kleibergen-Paap rk LM statistic          Chi-sq(2)=18.73    P-val=0.0001
        
        Weak identification test
        Ho: equation is weakly identified
        Cragg-Donald Wald F statistic                                      13.70
        Kleibergen-Paap Wald rk F statistic                                10.93
        
        Stock-Yogo weak ID test critical values for K1=1 and L1=2:
                                           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.
        NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
        
        Weak-instrument-robust inference
        Tests of joint significance of endogenous regressors B1 in main equation
        Ho: B1=0 and orthogonality conditions are valid
        Anderson-Rubin Wald test           F(2,3738)=     10.19     P-val=0.0000
        Anderson-Rubin Wald test           Chi-sq(2)=     20.43     P-val=0.0000
        Stock-Wright LM S statistic        Chi-sq(2)=     22.17     P-val=0.0000
        
        NB: Underidentification, weak identification and weak-identification-robust
            test statistics heteroskedasticity-robust
        
        Number of observations               N  =       5408
        Number of regressors                 K  =          9
        Number of endogenous regressors      K1 =          1
        Number of instruments                L  =         10
        Number of excluded instruments       L1 =          2
        
        IV (2SLS) estimation
        --------------------
        
        Estimates efficient for homoskedasticity only
        Statistics robust to heteroskedasticity
        
                                                              Number of obs =     5408
                                                              F(  9,  3739) =    27.59
                                                              Prob > F      =   0.0000
        Total (centered) SS     =  31581.08333                Centered R2   =  -0.3648
        Total (uncentered) SS   =  31581.08333                Uncentered R2 =  -0.3648
        Residual SS             =  43100.52916                Root MSE      =    3.395
        
        ------------------------------------------------------------------------------------------
                                 |               Robust
               H_HSP_RATING_9_10 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------------------+----------------------------------------------------------------
        OF1bTelehealthhistorical |   1.927841   .7168633     2.69   0.007     .5223598    3.333322
                    H_COMP_2_A_P |    .655708   .0490046    13.38   0.000     .5596297    .7517862
                    newNetwrkMem |   .2702723   .2737156     0.99   0.324    -.2663741    .8069188
                 logLicensedBeds |   .3527704   .7312045     0.48   0.630    -1.080828    1.786369
                            CMI2 |   .8622487   1.439348     0.60   0.549    -1.959734    3.684232
                   logAdmissions |   .0148941   .8592885     0.02   0.986    -1.669826    1.699614
                 logTotOutpatVis |   .1035788   .3254017     0.32   0.750    -.5344033     .741561
                  PhysAndNursTot |  -.0008241   .0005658    -1.46   0.145    -.0019335    .0002852
                       forprofit |   2.486796   1.083747     2.29   0.022     .3620025    4.611589
        ------------------------------------------------------------------------------------------
        Underidentification test (Kleibergen-Paap rk LM statistic):             18.734
                                                           Chi-sq(2) P-val =    0.0001
        ------------------------------------------------------------------------------
        Weak identification test (Cragg-Donald Wald F statistic):               13.699
                                 (Kleibergen-Paap rk Wald F statistic):         10.926
        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.
        NB: Critical values are for Cragg-Donald F statistic and i.i.d. errors.
        ------------------------------------------------------------------------------
        Hansen J statistic (overidentification test of all instruments):         3.845
                                                           Chi-sq(1) P-val =    0.0499
        ------------------------------------------------------------------------------
        Instrumented:         OF1bTelehealthhistorical
        Included instruments: H_COMP_2_A_P newNetwrkMem logLicensedBeds CMI2
                              logAdmissions logTotOutpatVis PhysAndNursTot forprofit
        Excluded instruments: Totalfacilityexpensesexcludin RV
        ------------------------------------------------------------------------------
        
        .

        Comment

        Working...
        X