Announcement

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

  • intervention with ARIMA

    Hi everyone,

    I work on time series with arima function.
    I would like to test if an intervention occurred during this period, but i can't find the way to do this.
    I have already tried with the "sbknown" function, but this is not relied on the arima regression.
    I created a new variable as well, coded as 0 before my intervention and 1 after, but the regression provides me only the coefficient for the slope and not the level.

    Could you please help me ?

    Thanks,
    Florence

  • #2

    Welcome to Statalist, Florence!



    I'm not very knowledgeable about arima, but in Stata I typed:

    Code:
    search structural breaks, all
    and was led to this post-time series command:
    estat sbsingle Test for a structural break with an unknown break date
    To investigate, type in Stata:
    Code:
    help estat sbsingle
    In the help window, click on the blue text "[TS] estat sbsingle" to go right to the Manual entry.

    However a search of the Manual for "break" brought up "mswitch-Markov-switching regression models, which might be more useful.

    Be sure to read the FAQ, especially FAQ 12, which asks that you show everything you typed and what Stata responded. . It's difficult to know what went wrong with your arima command, because you did not show us the command and its results. To make sure these are readable, show us everything between CODE delimiters as FAQ 12 requests. For example, to display the last Stata line above, I typed:
    [CODE]]help estat sbsingle[/CODE]
    Last edited by Steve Samuels; 30 Jul 2018, 17:07. Reason: Added reference to mswitch
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Hi Steve,

      Thank you very much for your answer.
      I work on a time series of 10 years, with 13 periods of 28 days defined each year. For an easier lecture, I defined my time unit as "cell", hence I can speak about one period of one year without any confusion. my cells go from 1 to 177, but I want to write an arima model only for cell 44 to 177.

      Here it's the arima model that I have chosen without any intervention :

      Code:
      arima taux_inc_cell_2, arima(1 0 0) sarima(1 1 0 13)
      estat ic
      ARIMA regression

      Sample: 53 - 177 Number of obs = 125
      Wald chi2(2) = 119.22
      Log likelihood = -159.9603 Prob > chi2 = 0.0000

      ---------------------------------------------------------------------------------
      S13. | OPG
      taux_inc_cell_2 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      ----------------+----------------------------------------------------------------
      taux_inc_cell_2 |
      _cons | -.2377036 .1911252 -1.24 0.214 -.612302 .1368949
      ----------------+----------------------------------------------------------------
      ARMA |
      ar |
      L1. | .6607892 .0683954 9.66 0.000 .5267367 .7948417
      ----------------+----------------------------------------------------------------
      ARMA13 |
      ar |
      L1. | -.2842023 .1014217 -2.80 0.005 -.4829852 -.0854195
      ----------------+----------------------------------------------------------------
      /sigma | .8642157 .0528887 16.34 0.000 .7605557 .9678758
      ---------------------------------------------------------------------------------
      Note: The test of the variance against zero is one sided, and the two-sided
      confidence interval is truncated at zero.

      . estat ic

      Akaike's information criterion and Bayesian information criterion

      -----------------------------------------------------------------------------
      Model | Obs ll(null) ll(model) df AIC BIC
      -------------+---------------------------------------------------------------
      . | 125 . -159.9603 4 327.9205 339.2338
      -----------------------------------------------------------------------------
      Note: N=Obs used in calculating BIC; see [R] BIC note.

      Then, I have made interrupted regression besides, thus I want to test the break at cell 80 which was defined as relevant with this last method.
      Hence I can use "estat sb known" more than "estat sbsingle", according to the stata manual.

      Here it's the command :
      Code:
      estat sbknown, break(tq(2010q3))
      for which stata's answer is :
      estat sbknown not valid
      r(321);
      I tried "estat sbknown(80)" or "estat sbknown(cell(80))" as well, but it doesn't work.

      Hope my explanation is more clear..

      Kind regards
      Florence

      Comment


      • #4

        Thanks for the information. I'm not competent to comment on your arima results. In future posts, please put the results as well as code between CODE delimiters.
        I apologize; I overlooked this sentence in the Manual.
        estat sbknown requires that the current estimation results be from regress or ivregress 2sls.
        But you can do the same thing with arima. The manual entry for estat sbknown defines breaks as level and slope changes in the mean of the series. Construct by hand an armax model to model the break: add the relevant predictors as in the Examples for estat sbknown. Then estimate and test the break coefficients yourself.

        Good luck!
        Last edited by Steve Samuels; 31 Jul 2018, 11:19. Reason: shortened
        Steve Samuels
        Statistical Consulting
        [email protected]

        Stata 14.2

        Comment


        • #5
          Sorry for the writing i'll do this on next time;
          That's what I did, but was not successful.. I'll try again.
          Thank you !

          Comment


          • #6
            If your next try doesn't work, show us the code and results. Without seeing these, we can't help.
            Steve Samuels
            Statistical Consulting
            [email protected]

            Stata 14.2

            Comment

            Working...
            X