Announcement

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

  • Specifying lags in ITSA multiple group model

    Hi

    How do you decide how many lags to include in a interrupted time series analysis (ITSA) with multiple groups?

    Following Linden (2015) there is a statistically significant lag at 1 but no higher, thus, using 1 lag is supported. However, in my analysis, there is a statistically significant lag at 7 (below). How can I handle this? Is it as easy as re-specifying my model with -lag(7)-?
    Code:
    itsa s_rate_treated, treatid(1) trperiod(677) lag(1) replace fig posttrend
    
    actest, lag(12)
    With output for -actest-:
    Code:
    Cumby-Huizinga test for autocorrelation
      H0: variable is MA process up to order q
      HA: serial correlation present at specified lags >q
    -----------------------------------------------------------------------------
      H0: q=0 (serially uncorrelated)        |  H0: q=specified lag-1
      HA: s.c. present at range specified    |  HA: s.c. present at lag specified
    -----------------------------------------+-----------------------------------
        lags   |      chi2      df     p-val | lag |      chi2      df     p-val
    -----------+-----------------------------+-----+-----------------------------
       1 -  1  |      4.271      1    0.0388 |   1 |      4.271      1    0.0388
       1 -  2  |      4.271      2    0.1182 |   2 |      0.112      1    0.7379
       1 -  3  |      7.608      3    0.0549 |   3 |      3.032      1    0.0816
       1 -  4  |      7.735      4    0.1018 |   4 |      0.761      1    0.3831
       1 -  5  |      8.317      5    0.1396 |   5 |      0.898      1    0.3432
       1 -  6  |     12.216      6    0.0573 |   6 |      3.446      1    0.0634
       1 -  7  |     15.377      7    0.0315 |   7 |      4.041      1    0.0444
       1 -  8  |     17.503      8    0.0253 |   8 |      2.524      1    0.1121
       1 -  9  |     17.812      9    0.0374 |   9 |      0.094      1    0.7595
       1 - 10  |     18.466      10   0.0476 |  10 |      1.847      1    0.1741
       1 - 11  |     19.343      11   0.0552 |  11 |      0.055      1    0.8154
       1 - 12  |     19.881      12   0.0694 |  12 |      1.769      1    0.1835
    -----------------------------------------------------------------------------
      Test allows predetermined regressors/instruments
      Test requires conditional homoskedasticity
    Thus, I specify the following model:
    Code:
    itsa s_rate_treated, treatid(1) trperiod(677) lag(7) fig posttrend
    Reference:
    Linden (2015) Conducting interrupted time-series analysis for single- and multiple-group comparisons. The Stata Journal. http://www.lindenconsulting.org/docu...SA_Article.pdf
    Last edited by Tarjei W. Havneraas; 31 Oct 2018, 17:15.

  • #2
    Also curious about this. What was the approach you took?

    Comment


    • #3
      Were you able to reach a solution to this? I am interested in the result.

      Comment


      • #4
        GPT4 says:

        In the `itsa` command for Stata, specifying multiple lags is unfortunately not as straightforward as specifying a single lag.

        As of my last update in 2022, the `itsa` command allows for a single lag to be specified using the `lag()` option. However, if you want to include multiple lags, you'll have to create the lagged variables manually and then include them in the model.

        Here's a step-by-step guide to specifying multiple lags within the `itsa` framework:

        1. **Generate Lagged Variables Manually**:
        - For example, if you want lags 1 and 7:
        ```
        gen varname_lag1 = varname[_n-1]
        gen varname_lag7 = varname[_n-7]
        ```

        2. **Use the `itsa` command without the `lag()` option**:
        - Instead, you'll manually include the lagged variables you generated in the previous step.
        - The `itsa` command is essentially a wrapper for the `regress` command in Stata but with additional functionalities for ITSA models. You can use `regress` to build your custom model.

        3. **Specify Your Model with Multiple Lags**:
        - Example:
        ```
        itsa yvar, treatid(treatment_variable) trperiod(interruption_point)
        ```

        4. **Include the Lagged Variables in Your Regression**:
        - Example:
        ```
        regress yvar treatment_variable##c.timevar varname_lag1 varname_lag7 other_covariates
        ```

        5. **Interpret the Results**:
        - Your output will now show the effects of the lags you included in your model. You'll need to interpret these coefficients in the context of your research question.

        Keep in mind that when you include multiple lags in a model, especially with a limited sample size, multicollinearity can become a concern. It's a good idea to check the variance inflation factor (VIF) and other multicollinearity diagnostics when modeling multiple lags.

        Lastly, always ensure that your model's specification aligns with the theoretical rationale and empirical understanding of your research question.


        Comment

        Working...
        X