Announcement

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

  • teffects: convergence not achieved

    Hi. I am studying the effects of a telemedicine network on Covid outcomes per week in India. The network operated in 17 out of 36 Indian states. I am trying to create a matched control group before running a two-way fixed effects model.

    My data is organized by states and the number of weeks of operation. The data comprises of a the outcome variable, con_avg7day, which varies by week number; a binary intervention variable (Telemed) which turns to 1 in the week the network started operations in a state; and, a set of other variables for matching (60 variables) which I hypothesize are related to the outcome and treatment variable, but are fixed (referred to as fixed variables below) - for eg, the population density per state in 2019, the poverty percentage as last available. A sample of the data is below.

    Code:
    input str50 state float(weeknum con_avg7day Telemed pop_perkm2_2019) int sexratio_2016 float(deathrate_2020 povertyperct per85_2011 rate_hostpital_public rate_hospital_private rate_hospital_beds_private rate_hospital_beds_total healthover_tot1516)
    "Andaman and Nicobar Islands"  3         1 0 48.12704 876 5.8   4.3 .2987537 .00007556675  .00001511335 .00055163726  .003259446    .
    "Andaman and Nicobar Islands"  4  9.714286 0 48.12704 876 5.8   4.3 .2987537 .00007556675  .00001511335 .00055163726  .003259446    .
    "Andaman and Nicobar Islands"  5 10.428572 0 48.12704 876 5.8   4.3 .2987537 .00007556675  .00001511335 .00055163726  .003259446    .
    "Andaman and Nicobar Islands"  6 11.142858 0 48.12704 876 5.8   4.3 .2987537 .00007556675  .00001511335 .00055163726  .003259446    .
    "Andaman and Nicobar Islands"  7 18.714285 0 48.12704 876 5.8   4.3 .2987537 .00007556675  .00001511335 .00055163726  .003259446    .
    "Andhra Pradesh"              25    372979 0 320.4234 998 6.3 12.31 .3636027 4.940541e-06 .000012830087  .0011507248 .0015938033  4.7
    "Andhra Pradesh"              26  445229.7 0 320.4234 998 6.3 12.31 .3636027 4.940541e-06 .000012830087  .0011507248 .0015938033  4.7
    "Andhra Pradesh"              27  517418.3 0 320.4234 998 6.3 12.31 .3636027 4.940541e-06 .000012830087  .0011507248 .0015938033  4.7
    "Andhra Pradesh"              44  883609.4 0 320.4234 998 6.3 12.31 .3636027 4.940541e-06 .000012830087  .0011507248 .0015938033  4.7
    "Andhra Pradesh"              45  885234.1 0 320.4234 998 6.3 12.31 .3636027 4.940541e-06 .000012830087  .0011507248 .0015938033  4.7
    "Andhra Pradesh"              46  886255.6 0 320.4234 998 6.3 12.31 .3636027 4.940541e-06 .000012830087  .0011507248 .0015938033  4.7
    "Andhra Pradesh"              47  887224.6 0 320.4234 998 6.3 12.31 .3636027 4.940541e-06 .000012830087  .0011507248 .0015938033  4.7
    "Andhra Pradesh"              48 253650.86 0 320.4234 998 6.3 12.31 .3636027 4.940541e-06 .000012830087  .0011507248 .0015938033  4.7
    "Arunachal Pradesh"            4  .2857143 1 17.95971 938 5.7 24.27 .2721635 .00014494681 .000013297872  .0001462766 .0017446808 5.73
    "Arunachal Pradesh"            5         1 1 17.95971 938 5.7 24.27 .2721635 .00014494681 .000013297872  .0001462766 .0017446808 5.73

    I've run several models using different combinations of the fixed variables in the teffects command for the propensity score matching, but have failed to achieve convergence. On running the model below, I received the "treatment overlap assumption has been violated" message, deleted the overlap==1 observations, but still fail to achieve convergence.

    Code:
    teffects ipwra (con_avg7day test_avg7day) (Telemed pop_perkm2_2019 sexratio_2016 projpercturb
    > an_2019 litrate_2011 birthrate_2020 deathrate_2020 naturalgrwthrate_2020 povertyperct lifeexp
    > ectancy_2019 per60_2011 per85_2011 rate_hospital_total rate_hospital_beds_total rate_icu_beds
    > _total rate_ventilators_total healthover_tot1516 exphealth_percap151, logit), iterate(100) os
    > ample(overlap)
    treatment 0 has 232 propensity scores less than 1.00e-05
    treatment 1 has 40 propensity scores less than 1.00e-05
    treatment overlap assumption has been violated by observations identified in variable 
    osample(overlap)
    r(498);
    
    drop if overlap==1
    (272 observations deleted)
    
    . teffects ipwra (con_avg7day test_avg7day) (Stepone pop_perkm2_2019 sexratio_2016 projpercturb
    > an_2019 litrate_2011 birthrate_2020 deathrate_2020 naturalgrwthrate_2020 povertyperct lifeexp
    > ectancy_2019 per60_2011 per85_2011 rate_hospital_total rate_hospital_beds_total rate_icu_beds
    > _total rate_ventilators_total healthover_tot1516 exphealth_percap151, logit), iterate(100)
    
    Iteration 0:   EE criterion =  1.036e-16  (not concave)
    Iteration 1:   EE criterion =  1.036e-16  (not concave)
    Iteration 2:   EE criterion =  1.036e-16  (not concave)
    .....................................
    Iteration 96:  EE criterion =  1.036e-16  (not concave)
    Iteration 97:  EE criterion =  1.036e-16  (not concave)
    Iteration 98:  EE criterion =  1.036e-16  (not concave)
    Iteration 99:  EE criterion =  1.036e-16  (not concave)
    Iteration 100: EE criterion =  1.036e-16  (not concave)
    convergence not achieved
    convergence not achieved
        The Gauss-Newton stopping criterion has been met but missing standard errors indicate
        some of the parameters are not identified.
    
    Treatment-effects estimation                    Number of obs     =      1,170
    Estimator      : IPW regression adjustment
    Outcome model  : linear
    Treatment model: logit
    ------------------------------------------------------------------------------------------
                             |               Robust
                 con_avg7day |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------------------+----------------------------------------------------------------
    ATE                      |
                     Stepone |
                   (1 vs 0)  |   11004.42          .        .       .            .           .
    -------------------------+----------------------------------------------------------------
    POmean                   |
                     Stepone |
                          0  |   147907.5          .        .       .            .           .
    ------------------------------------------------------------------------------------------
    Warning: convergence not achieved
    I also ran a linear regressions followed by the vif command and check for variable correlation (shown below) to eliminate variables which are collinear in the models, but that hasn't helped either.

    Code:
    corr Stepone pop_perkm2_2019 sexratio_2016 projpercturban_2019 litrate_2011 birthrate_2020 de
    > athrate_2020 naturalgrwthrate_2020 povertyperct lifeexpectancy_2019 per60_2011 per85_2011 rat
    > e_hospital_total rate_hospital_beds_total rate_icu_beds_total rate_ventilators_total healthov
    > er_tot1516 exphealth_percap1516,
    (obs=1,170)
    
                 |  Telemed pop~2019 sex~2016 projpe~9 lit~2011 bir~2020 dea~2020 nat~2020 povert~t
    -------------+---------------------------------------------------------------------------------
         Stepone |   1.0000
    pop_per~2019 |   0.1796   1.0000
    sexrati~2016 |  -0.1338  -0.3700   1.0000
    projper~2019 |   0.0733   0.6693  -0.0099   1.0000
    litrate_2011 |  -0.0699   0.2397   0.3434   0.6251   1.0000
    birthra~2020 |   0.1246  -0.1349  -0.2537  -0.5076  -0.6619   1.0000
    deathra~2020 |  -0.0882  -0.4177   0.2878  -0.3140  -0.1298   0.2334   1.0000
    natural~2020 |   0.1507  -0.0373  -0.3366  -0.4452  -0.6498   0.9709  -0.0056   1.0000
    povertyperct |   0.3135  -0.2444  -0.1741  -0.6166  -0.6573   0.7917  -0.0608   0.8273   1.0000
    lifeexp~2019 |  -0.0698   0.1309   0.3691   0.5561   0.6581  -0.7818  -0.0694  -0.7865  -0.7442
      per60_2011 |  -0.2089  -0.1317   0.3835   0.2638   0.3118  -0.3689   0.6741  -0.5452  -0.5885
      per85_2011 |  -0.2844  -0.1978   0.2044  -0.0299   0.3912  -0.3450   0.6277  -0.5053  -0.5162
    rate~l_total |  -0.1338  -0.2385   0.3027  -0.1600   0.1592   0.0495   0.4694  -0.0611  -0.2226
    rate_hospi.. |   0.0635   0.0844   0.4109   0.4591   0.4768  -0.3710   0.3011  -0.4530  -0.5936
    rate_icu_b~l |   0.0637   0.0842   0.4106   0.4597   0.4772  -0.3712   0.3009  -0.4531  -0.5937
    rate_venti~l |   0.0637   0.0851   0.4109   0.4583   0.4757  -0.3707   0.3022  -0.4529  -0.5933
    healtho~1516 |   0.0793   0.7402  -0.1499   0.4915   0.4833  -0.2757  -0.5020  -0.1617  -0.2897
    exphe~ap1516 |  -0.1489  -0.0039   0.1434   0.2300   0.5613  -0.4064  -0.4401  -0.3100  -0.3535
    
                 | lif~2019 per60_~1 per85_~1 ~l_total rate_h.. rate_i~l rate_v~l hea~1516 e~ap1516
    -------------+---------------------------------------------------------------------------------
    lifeexp~2019 |   1.0000
      per60_2011 |   0.4646   1.0000
      per85_2011 |   0.4065   0.7139   1.0000
    rate~l_total |   0.0029   0.2167   0.3783   1.0000
    rate_hospi.. |   0.4761   0.4710   0.2969   0.6785   1.0000
    rate_icu_b~l |   0.4760   0.4714   0.2965   0.6779   1.0000   1.0000
    rate_venti~l |   0.4765   0.4713   0.2981   0.6791   1.0000   1.0000   1.0000
    healtho~1516 |   0.1361  -0.2915  -0.1696  -0.0674   0.1004   0.1006   0.0996   1.0000
    exphe~ap1516 |   0.1679  -0.1968  -0.1076   0.1332   0.1790   0.1802   0.1757   0.5225   1.0000
    Any thoughts on what the problem may be here and how I can solve for it would be much appreciated.

  • #2
    Hi Scott
    This is a problem with teffects. When the scale of the outcome variable is large (as in your case), gmm (the command behind teffects) has problems finding a solution to the model.
    You have two options
    1. Change scale, say by dividing by 10000 or more
    2. Add an "maxiter" option allowing for only 10 iterations (or so).
    To make sure results are as they should, do the estimation manually, and compare point estimates
    HTH
    F

    Comment


    • #3
      Thank you, FernandoRios. Scaling it down solved the problem.

      If I may ask more - I am running into another problem. When I run a teffects model that is loaded with many covariates below, I get a variables omitted because of collinearity and convergence not achieved. However, as should in #1 the variables aren't really correlated and so I am unsure as to what to do here.

      Code:
      teffects ipwra (rate_con_avg7day rate_test_avg7day) (Telemed pop_perkm2_2019 sexratio_2016 projpercturban_2019 litrate_2011 birthrate_2020 ///
      > deathrate_2020 naturalgrwthrate_2020 infantmortrate_2020 perct_sc perct_st povertyperct lifeexpectancy_2019 per60_2011 per85_2011 muslim_2011 rate_hospital_total ///
      > healthover_tot1516 exphealth_percap1516 exphealth_pergsdp1516 rate_malariacase2018 rate_malariadeath2018 rate_denguecase2018 ///
      > rate_denguedeath2018 rate_typoidtot_case2018 rate_typoidtot_death2018 rate_acuteresp_totcase2018 rate_acuteresp_totdeath2018 rate_pneumoniatot_case2018 ///
      > rate_pneumoniatot_death2018 rate_tb2018 rate_influenzacase_2018 rate_influenzadeath_2018 rate_hepcases_2018 rate_hepdeaths_2018 ///
      > rate_diabetes2018 rate_hypertension2018 rate_htnanddm2018 rate_cvds2018 rate_stroke2018 rate_commoncancers2018 rate_mentalillness_2011, logit), iterate(100)
      note: rate_denguedeath2018 omitted because of collinearity
      note: rate_typoidtot_case2018 omitted because of collinearity
      note: rate_typoidtot_death2018 omitted because of collinearity
      note: rate_acuteresp_totcase2018 omitted because of collinearity
      note: rate_acuteresp_totdeath2018 omitted because of collinearity
      Note: tmodel mlogit initial estimates did not converge; the model may not be identified
      
      note: instrument __00000M omitted because of collinearity
      Iteration 0:   EE criterion =  4.211e-09  (not concave)
      Iteration 1:   EE criterion =  3.071e-09  (not concave)
      Iteration 2:   EE criterion =  2.503e-09  (not concave)
      Iteration 3:   EE criterion =  2.027e-09  (not concave)
      ...................................
      Iteration 12:  EE criterion =  5.630e-10  (not concave)
      Iteration 13:  EE criterion =  5.445e-10  (not concave)
      ...........
      Iteration 59:  EE criterion =  2.660e-10  (not concave)
      Iteration 60:  EE criterion =  2.644e-10  (not concave)
      .............................................
      Iteration 92:  EE criterion =  2.379e-10  (not concave)
      ......................................
      Iteration 97:  EE criterion =  2.361e-10  (not concave)
      Iteration 98:  EE criterion =  2.358e-10  (not concave)
      Iteration 99:  EE criterion =  2.355e-10  (not concave)
      Iteration 100: EE criterion =  2.352e-10  (not concave)
      convergence not achieved
      
      Treatment-effects estimation                    Number of obs     =      1,019
      Estimator      : IPW regression adjustment
      Outcome model  : linear
      Treatment model: logit
      ---------------------------------------------------------------------------------------------
                                  |               Robust
                 rate_con_avg7day |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      ----------------------------+----------------------------------------------------------------
      ATE                         |
                          Stepone |
                        (1 vs 0)  |   .0001207   .0002216     0.54   0.586    -.0003136    .0005549
      ----------------------------+----------------------------------------------------------------
      POmean                      |
                          Stepone |
                               0  |    .003657   .0002247    16.27   0.000     .0032166    .0040974
      ---------------------------------------------------------------------------------------------
      Warning: convergence not achieved

      Further, when I run a more parsimonious model (below), I still don't achieve convergence.

      Code:
      teffects ipwra (rate_con_avg7day rate_test_avg7day) (Stepone pop_perkm2_2019 sexratio_2016 pr
      > ojpercturban_2019 litrate_2011 birthrate_2020 deathrate_2020 naturalgrwthrate_2020 povertyper
      > ct lifeexpectancy_2019 per60_2011 per85_2011 rate_hospital_total rate_hospital_beds_total rat
      > e_icu_beds_total rate_ventilators_total healthover_tot1516 exphealth_percap151, logit),  iter
      > ate(100)
      
      Iteration 0:   EE criterion =  1.102e-23  
      Iteration 1:   EE criterion =  4.906e-28  
      convergence not achieved
          The Gauss-Newton stopping criterion has been met but missing standard errors indicate
          some of the parameters are not identified.
      
      Treatment-effects estimation                    Number of obs     =      1,394
      Estimator      : IPW regression adjustment
      Outcome model  : linear
      Treatment model: logit
      ------------------------------------------------------------------------------------------
                               |               Robust
              rate_con_avg7day |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
      -------------------------+----------------------------------------------------------------
      ATE                      |
                       Stepone |
                     (1 vs 0)  |   .0004849   .0002321     2.09   0.037     .0000301    .0009397
      -------------------------+----------------------------------------------------------------
      POmean                   |
                       Stepone |
                            0  |   .0037676   .0001865    20.20   0.000     .0034021    .0041331
      ------------------------------------------------------------------------------------------
      Warning: convergence not achieved
      My understanding is that the more variables that are loaded into the first step logit command, the better it is. However, I have limited understanding about the teffects command matching in general. How do I assess which of these two models are better or if both are problematic? The first model is based on theory. However, given that the second model gives me estimates, is that okay to use despite not achieving convergence? And if not, how should I pick a model and which variables to use?

      Comment

      Working...
      X