Announcement

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

  • Reference variable for 'estat sbcusum'?

    For my project I am using the command "estat sbcusum" to carry out a cusum test. Before, I use regress to regress my variable to the variable I want to use as a reference. This for example may be a lagged version of the first variable (52 weeks earlier). I am not sure if I'm doing it right though. Can you tell me exactly which cumulative sum the command estat sbcusum uses after I run the regression? I noticed, that it is not the difference between the two variables.

  • #2
    Welcome to the Stata Forum/Statalist,

    If you didn't read it yet, perhaps you wish to take a look at this text. Also, this one.
    Best regards,

    Marcos

    Comment


    • #3
      Hello Marcos,

      thank you for the links. I have read both of those texts, but i do not quite understand what stata does with the previously performed regression.
      So if I use

      reg var L52.var
      estat sbcusum

      which residuals will stata cumulate for the test?

      Thank you,
      Steven

      Comment


      • #4
        From the text shared in #2:

        stat sbcusum uses the cumulative sum of recursive residuals or the cumulative sum of OLS residuals to determine to test whether there is a structural break. Under the null hypothesis, the cumulative sum of residuals will have mean zero
        Best regards,

        Marcos

        Comment


        • #5
          Thank you Marcos. I still do not understand with what exactly I am dealing with the regression. Maybe you can help me if I rephrase my question.

          How can I compute a CUSUM-Test of a variable with another variable as a reference?

          So for example use the cumulative sum of the difference between "var" and "L52.var". Another use would be between "var" and a linear prediction. So if var consists of four years and I want to compute a linear prediction with data of the first three and then compute the CUSUM-Test for the last year.

          Best regards,
          Steven
          Last edited by Steven Seip; 20 Jun 2018, 10:17.

          Comment


          • #6
            As far as I'm concerned, you have two possibilities, as demonstrated in the Stata Manual. For OLS, we have the cumulative sum of OLS residuals. For recursive models, such as when we use lags, we get the cumulative sum of recursive residuals. Therefore, what we get depends on the command we type. Hopefully you'll get further help.
            Best regards,

            Marcos

            Comment

            Working...
            X