Announcement

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

  • Interrupted time series-xtitsa

    Hello,

    I am using XTITSA command to study the intervention on the behavior of Covid-19 cases the code is as below:
    Code:
    xtitsa Avg_cases i.calender_week_from_opening    i._x0#c.less_20 i._x0#c.age_20_39 i._x0#c.age_40_59 i._x0#c.age_60_84 i._x0#c.age_over_85  i._x0##i.income_median  i._x0#c.non_hispanic_latin_percent i._x0#c.hispanic_latin_percent i._x0#c.others_percent i._x0#c.white_only_percent i._x0#c.blk_african_amr_percent  i._x0#c.other_races_percent , single  trperiod(0) vce(robust) posttrend figure replace
    the problem is that the chi2 test return no result"." as shown below, the second issue that I got wide CI for _x0 coefficient.

    Code:
    Panel variable: fips (unbalanced)
     Time variable: weeks, -4 to 12
             Delta: 1 unit
    note: 1._x0 omitted because of collinearity.
    
    Iteration 1: tolerance = 8.2533026
    Iteration 2: tolerance = .27798123
    Iteration 3: tolerance = .00738007
    Iteration 4: tolerance = .00021537
    Iteration 5: tolerance = 6.315e-06
    Iteration 6: tolerance = 1.646e-07
    
    GEE population-averaged model                         Number of obs    = 1,905
    Group variable: fips                                  Number of groups =   114
    Family: Gaussian                                      Obs per group:  
    Link:   Identity                                                   min =     5
    Correlation: exchangeable                                          avg =  16.7
                                                                       max =    17
                                                          Wald chi2(70)    =     .
    Scale parameter = 242.8472                            Prob > chi2      =     .
    
                                                           (Std. err. adjusted for clustering on fips)
    --------------------------------------------------------------------------------------------------
                                     |               Robust
                          _Avg_cases | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    ---------------------------------+----------------------------------------------------------------
                                  _t |   .7490542   .6613248     1.13   0.257    -.5471185    2.045227
                                 _x0 |   1232.655   925.8409     1.33   0.183      -581.96     3047.27
                               _x_t0 |  -.7143659    .903106    -0.79   0.429    -2.484421    1.055689
                                     |
          calender_week_from_opening |
                                 12  |    6.10015   1.583337     3.85   0.000     2.996867    9.203433
                                 13  |   8.807565   1.867446     4.72   0.000     5.147438    12.46769
                                 14  |   15.56154   2.614388     5.95   0.000     10.43744    20.68565
                                 15  |     17.097   3.447891     4.96   0.000     10.33926    23.85474
                                 16  |   11.66626   3.748177     3.11   0.002     4.319965    19.01255
                                 17  |   12.30973   4.018168     3.06   0.002      4.43427     20.1852
                                 18  |   10.47149   4.630941     2.26   0.024     1.395013    19.54797
                                 19  |   8.610292   5.071487     1.70   0.090    -1.329639    18.55022
                                 20  |   3.386195   5.573258     0.61   0.543    -7.537189    14.30958
                                 21  |    2.98615   5.868291     0.51   0.611     -8.51549    14.48779
                                 22  |   1.925049   6.277048     0.31   0.759    -10.37774    14.22784
                                 23  |   1.453094   6.766818     0.21   0.830    -11.80963    14.71581
                                 24  |  -.2908339   7.218285    -0.04   0.968    -14.43841    13.85675
                                 25  |  -.1396369   7.853128    -0.02   0.986    -15.53148    15.25221
                                 26  |   .2681749   8.381983     0.03   0.974    -16.16021    16.69656
                                 27  |   .2163127   8.825185     0.02   0.980    -17.08073    17.51336
                                 28  |   2.806489   9.143373     0.31   0.759    -15.11419    20.72717
                                 29  |   3.590357   9.617246     0.37   0.709     -15.2591    22.43981
                                 30  |   5.980221   10.16806     0.59   0.556    -13.94881    25.90925
                                 31  |   9.937396   11.39831     0.87   0.383    -12.40289    32.27768
                                 32  |   2.912618   11.14749     0.26   0.794    -18.93606     24.7613
                                 41  |   61.63976   11.10608     5.55   0.000     39.87223    83.40728
                                 42  |   56.33374   15.48673     3.64   0.000      25.9803    86.68717
                                 43  |   72.50997   12.52376     5.79   0.000     47.96384    97.05609
                                 44  |   77.22091   15.33212     5.04   0.000     47.17051    107.2713
                                 45  |   93.09452   16.31863     5.70   0.000      61.1106    125.0784
                                 46  |   114.6563   11.83311     9.69   0.000     91.46386    137.8488
                                 47  |   137.2613    8.33408    16.47   0.000     120.9268    153.5958
                                 48  |   136.2834   10.75055    12.68   0.000     115.2127    157.3541
                                 49  |   100.6777   9.125954    11.03   0.000     82.79119    118.5643
                                 50  |   76.45914   8.667602     8.82   0.000     59.47095    93.44733
                                 51  |   60.05309    7.56156     7.94   0.000     45.23271    74.87348
                                 52  |   56.65902   9.143364     6.20   0.000     38.73835    74.57968
                                 53  |   40.00331   7.354229     5.44   0.000     25.58928    54.41733
                                 54  |   42.67515   8.206872     5.20   0.000     26.58998    58.76032
                                 55  |   56.11203   9.980569     5.62   0.000     36.55047    75.67358
                                 56  |   43.82822   9.115273     4.81   0.000     25.96262    61.69383
                                 57  |    26.8053   8.294249     3.23   0.001     10.54887    43.06173
                                 58  |   20.33176   9.004612     2.26   0.024     2.683044    37.98047
                                 59  |   12.25771   9.041326     1.36   0.175    -5.462961    29.97838
                                 60  |   8.001382    8.86166     0.90   0.367    -9.367153    25.36992
                                 61  |   10.28908   9.488877     1.08   0.278    -8.308783    28.88693
                                 62  |   11.42351   10.50192     1.09   0.277    -9.159879    32.00691
                                     |
                       _x0#c.less_20 |
                                  0  |    16.1055   10.37929     1.55   0.121    -4.237539    36.44853
                                  1  |   2.694422   6.039775     0.45   0.656     -9.14332    14.53216
                                     |
                     _x0#c.age_20_39 |
                                  0  |   16.95458    10.3578     1.64   0.102    -3.346334    37.25549
                                  1  |   1.323924   5.836164     0.23   0.821    -10.11475     12.7626
                                     |
                     _x0#c.age_40_59 |
                                  0  |   16.58113   10.46101     1.59   0.113    -3.922073    37.08434
                                  1  |   1.690815     5.9803     0.28   0.777    -10.03036    13.41199
                                     |
                     _x0#c.age_60_84 |
                                  0  |   15.41947   10.23532     1.51   0.132    -4.641387    35.48032
                                  1  |   1.566354    5.88014     0.27   0.790    -9.958507    13.09122
                                     |
                   _x0#c.age_over_85 |
                                  0  |   22.33079   11.38901     1.96   0.050     .0087275    44.65284
                                  1  |   3.104724   6.156173     0.50   0.614    -8.961154     15.1706
                                     |
                               1._x0 |          0  (omitted)
                                     |
                       income_median |
                                  2  |   -9.03515   5.129031    -1.76   0.078    -19.08787    1.017567
                                  3  |  -8.121615   6.938838    -1.17   0.242    -21.72149    5.478257
                                     |
                   _x0#income_median |
                                1 2  |   10.50574   5.709952     1.84   0.066     -.685561    21.69704
                                1 3  |   6.923233   6.676728     1.04   0.300    -6.162913    20.00938
                                     |
    _x0#c.non_hispanic_latin_percent |
                                  0  |   -2.42185   2.934019    -0.83   0.409    -8.172422    3.328723
                                  1  |   1.329811   1.955834     0.68   0.497    -2.503554    5.163175
                                     |
        _x0#c.hispanic_latin_percent |
                                  0  |  -2.378546   2.924871    -0.81   0.416    -8.111187    3.354096
                                  1  |   1.417435   1.949878     0.73   0.467    -2.404256    5.239126
                                     |
                _x0#c.others_percent |
                                  0  |  -2.088937   2.911955    -0.72   0.473    -7.796263     3.61839
                                  1  |   1.385719   1.935896     0.72   0.474    -2.408568    5.180005
                                     |
            _x0#c.white_only_percent |
                                  0  |  -1.823048   2.527546    -0.72   0.471    -6.776948    3.130852
                                  1  |  -3.348394   1.286855    -2.60   0.009    -5.870584   -.8262046
                                     |
       _x0#c.blk_african_amr_percent |
                                  0  |  -2.158053   2.560706    -0.84   0.399    -7.176944    2.860838
                                  1  |  -3.103864   1.281219    -2.42   0.015    -5.615007     -.59272
                                     |
           _x0#c.other_races_percent |
                                  0  |  -1.857145   2.534325    -0.73   0.464    -6.824331    3.110041
                                  1  |  -3.240256   1.283958    -2.52   0.012    -5.756767   -.7237451
                                     |
                               _cons |  -1221.086       1075    -1.14   0.256    -3328.046    885.8743
    --------------------------------------------------------------------------------------------------
    
    
                        Postintervention Linear Trend: 0
    
    Treated: _b[_t]+_b[_x_t0]
    ------------------------------------------------------------------------------
    Linear Trend |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
         Treated |   .0346882   .6493813     0.05   0.957    -1.238076    1.307452
    ------------------------------------------------------------------------------
    Any suggestions to resolve this issue?
    Last edited by amera amery; 12 Jun 2022, 20:50.

  • #2
    Why is your panel so unbalanced?

    Comment


    • #3
      I used two variables panel data county_fips and time : some counties will have 17 observations and others will have 16 observations. I do not think this is the problem because I am running same code with another group of counties and its work. I noticed when I remove i.week_calender variable the chi2 is estimated but CI still very wide.

      Comment


      • #4
        Oh I didn't think that was the problem, I was just curious about why it was so unbalanced.


        Anyways, your real issue seems to be all of the one way interaction terms you include. Why do you include so many? And also, what policy are you evaluating anyways? Gimme details: how many units are treated versus untreated?

        Comment


        • #5
          I am studying the mask mandate policy, so want to see how all variables behave after and before the mask policy. for instance, the number of people with age>85 significantly increased the number of covid-19 (22.33 p-value 0.05) but after the policy was implemented this effectiveness is no more significant (3.11 with p_value .61) that is why I include many interaction terms.

          Comment


          • #6
            Even I removed all variables and try with :
            Code:
             
             xtitsa Avg_cases i.calender_week_from_opening     i._x0##i.income_median   , single  trperiod(0) vce(robust) posttrend figure replace
            I got better CI but still unable to estimate chi2 test.

            Comment


            • #7
              I have a much better suggestion for you, in this case. I think it'll take away some of the major issues there are with ITSA. May I suggest a slight addendum? amera amery

              Comment


              • #8
                Thank you Jared. Yes sure. I just have an update. I read in one forum we can get chi2 by removing
                vce(robust) from the previous command. I tried it with having many variables and I got the chi2 results. What makes me uncomfortable with my result is the high value and CI for _x0

                Comment


                • #9
                  So wait.... do you have only one treated unit? Is that all we're working with here?

                  Comment


                  • #10
                    Yes. Mask Treatment in my model. Is this what you mean? But I have 3000 counties I want to check the impact of treatment over them

                    Comment

                    Working...
                    X