Announcement

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

  • Markov Switching model

    I was wondering whether it is possible to see which observations are allocated to the different states when a markov switching model is used. Does anybody know a command I could use?

  • #2
    I have the same question regarding mswitch in Stata 14.1. How to see which values of response/outcome are assigned to different states. E.g. if my dependent variable is a continuous variable consisting of positive, negative and zero values, and i run a two state mswitch, is there any way to see that to which state zeros are assigned?

    Thank you

    Comment


    • #3
      Dear jspro and Behram,

      In a Markov-switching model, we do not know with certainty the assignment of observations to states. Rather we can only estimate the probability of an observation being in a given state.

      You may use the -predict- command with option -pr- after you fit a model with -mswitch- to obtain the probabilities.

      Best,
      Ashish

      Comment


      • #4
        I fit a three-regime model, and wish to obtain the filtered probabilities for those three states. How can I do that?
        Ho-Chuan (River) Huang
        Stata 19.0, MP(4)

        Comment


        • #5
          Originally posted by Ashish Rajbhandari (StataCorp) View Post
          Dear jspro and Behram,

          In a Markov-switching model, we do not know with certainty the assignment of observations to states. Rather we can only estimate the probability of an observation being in a given state.

          You may use the -predict- command with option -pr- after you fit a model with -mswitch- to obtain the probabilities.

          Best,
          Ashish
          I fit a three-regime model, and wish to obtain the filtered probabilities for those three states. How can I do that? Thanks in advance.
          Ho-Chuan (River) Huang
          Stata 19.0, MP(4)

          Comment


          • #6
            Hi River, After you run the model, you can get filtered probabilities by typing:

            Code:
            predict fprob, pr smethod(filter)
            .

            For details, please look at http://www.stata.com/manuals14/tsmsw...postestimation

            Comment


            • #7
              Originally posted by Behram Wali View Post
              Hi River, After you run the model, you can get filtered probabilities by typing:

              Code:
              predict fprob, pr smethod(filter)
              .

              For details, please look at http://www.stata.com/manuals14/tsmsw...postestimation
              I did that before. But, shouldn't we obtain "three" filtered probabilities for each of the three states. Your suggested command, as I did earlier, only provided one series of probability.
              Ho-Chuan (River) Huang
              Stata 19.0, MP(4)

              Comment


              • #8
                Dear Professor Huang,

                I think you may try the following command:

                predict pr_31 pr_32 pr_33, pr smethod(filter)

                I hope this helps.

                Best wishes,
                Catherine

                Comment

                Working...
                X