Announcement

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

  • radf test for explosiveness

    Hi, I am trying to run the radf command to test for explosiveness in Stata. Apparently it is required to use this command before running the actual radf test: radf varname [if ] [in] [, prefix(string) maxlag(integer) criterion(string) window(integer) bs seed(integer) boot(integer) print graph]. I am referring to this https://www.stata.com/meeting/uk20/s...UK20_Otero.pdf. However it does not work for me at all, varname is not found, and others are recognised or not allowed. Can anyone help me with this?

  • #2
    Post the actual code you ran with a snippet of data preferably from dataex. There is absolutely no way to know what went wrong without seeing what you did.

    Comment


    • #3
      On slide 17 of the presentation you linked to, we see

      Before using the command radf, and similar to many other Stata time-series commands, it is necessary to tsset the data. Then:

      radf varname [if ] [in] [, prefix(string) maxlag(integer ) criterion(string)
      window(integer) bs seed(integer) boot(integer) print graph]

      Note that varname may not contain gaps, but may contain time-series operators.
      I am guessing you have misinterpreted that. The command you must run before running the radf command is
      Code:
      tsset timevar
      where you replace "timevar" with the name of the variable in your dataset that indicates time.

      Then to run the radf test you run the radf command, where
      Code:
      radf varname [if ] [in] [, prefix(string) maxlag(integer) criterion(string) window(integer) bs seed(integer) boot(integer) print graph]
      is not to be typed exactly like that. Instead, continue reading slides 18 onward for the explanation of what those arguments to the radf command signify, and pages 23 onward for examples.

      Once you do that you should be able to write the appropriate tsset and radf commands for your data.

      Comment


      • #4
        Hi, thank you for your answers. I did tsset my timevariable and also run the radf test, both the normal one and the one with boot and seed. I was just wondering if the code above was required to draw a graph or calculate critical values as specified in the text. I was not sure if I should include, for example, bs or print graph already in the radf command that is given in the example or need to do a different command for them? I thought the code above would tell Stata what to do once I run the radf command (eg print a graph etc) I used radf UK maxlag(1) but for inclusion of the other functions would I just need to write radf UK maxlag(1) bs print graph then for example?

        Comment


        • #5
          I was not sure if I should include, for example, bs or print graph already in the radf command that is given in the example or need to do a different command for them?
          Adding the bs or print or graph options to the radf command will expand what the radf command does - it is not necessary to run the radf command twice.

          Note that the graph option also requires you to use the prefix() option to specify the first portion of the names of the new variables it adds to the dataset. In you case, preifx(UK) seems to be a sensible solution.

          And the bs option is best run using the seed() option to ensure replicability of the results, as the documentation tells us.

          Comment


          • #6
            Thank you for the clarification!

            Comment


            • #7
              Just one question: If I include the boot command as well it does not show me a test statistic or a graph but results remain as shown in the screenshot. Is this just because my laptop is too slow or could I do something wrong? Without the boot option everything works properly.
              Attached Files

              Comment


              • #8
                You are asking the radf command to fit the radf model on 499 different random samples drawn from your data - that is what bootstrapping is. I would expect it to take 500 times longer than running the command without the boot option.

                Try a boot(10) and see how long it takes. Then try boot(20) and see how long it takes. Use this as a guide to how large a value you have the patience to wait for.

                Comment


                • #9
                  Okay that makes sense, thank you!

                  Comment

                  Working...
                  X