Markov switching model
Moderators: EViews Gareth, EViews Moderator
Re: Markov switching model
Hi
Thanks for sharing the program. How did you did you get this?
'Fixed transition probabilities
!p11 = 0.85
!p22 = 0.70
Is this an assumption. If not, how do go about estimating the probabilities? Any advice?
Thanks for sharing the program. How did you did you get this?
'Fixed transition probabilities
!p11 = 0.85
!p22 = 0.70
Is this an assumption. If not, how do go about estimating the probabilities? Any advice?
Re: Markov switching model
It is just an assumption. They serve as starting values. Actual transition probabilities are p(1) and p(2), which are estimated along with the model. If you experience convergence problems, changing these starting values may help.
Speaking of estimation problems, please note that probabilities must take values between 0 and 1. In order to achieve that you may need to apply a proper transformation. Something like:
c(1) = 1.74
c(2) = 1.10
p(1) = @logit(c(1))
p(2) = @logit(c(2))
Speaking of estimation problems, please note that probabilities must take values between 0 and 1. In order to achieve that you may need to apply a proper transformation. Something like:
c(1) = 1.74
c(2) = 1.10
p(1) = @logit(c(1))
p(2) = @logit(c(2))
Re: Markov switching model
Dear trubador
Many thanks for your reply.
Many thanks for your reply.
Re: Markov switching model
Hi,
Can anyone tell me a potential problem as to why do I keep getting a singular covariance?
thank you,
Can anyone tell me a potential problem as to why do I keep getting a singular covariance?
thank you,
Re: Markov switching model
i need help please. when i write the code in the LogL object and try to run it, it says that the !nr is an illegal or reserved name in '!nr=2'
why is this happening?
why is this happening?

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12388
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Markov switching model
You cannot use a program variable inside a LogL specification (unless doing so as part of the program).
Follow us on Twitter @IHSEViews
Re: Markov switching model
Hi everyone here..Good Day!
I'm too new to state space modelling, but i'm interested to explore the markovswitching model based on Hamilton (1989) for some analysis in business cycle.
Thanks for the generous sharing from trubador which provided me some idea on how the model can be carried out in Eviews.
However, i'm facing some errors which stopped me to proceed. Appreciate if someone can advice me on how to correct from the errors"Syntax error in matrix(!ns,!ns) transp" and "!NR not defined". I indeed successfully defined the !NR when i specify the number of regimes, but when i trying to specify the number of states, the error message stating "!NR not defined" appeared!
Appreciate if any expert or business cycle analyst which involve in markovswitching model could share with my about the coding and technical detail of markovswitching model in Eviews as i'm not familiar with programming language and hope to learn more from here.
Thanks!!
I'm too new to state space modelling, but i'm interested to explore the markovswitching model based on Hamilton (1989) for some analysis in business cycle.
Thanks for the generous sharing from trubador which provided me some idea on how the model can be carried out in Eviews.
However, i'm facing some errors which stopped me to proceed. Appreciate if someone can advice me on how to correct from the errors"Syntax error in matrix(!ns,!ns) transp" and "!NR not defined". I indeed successfully defined the !NR when i specify the number of regimes, but when i trying to specify the number of states, the error message stating "!NR not defined" appeared!
Appreciate if any expert or business cycle analyst which involve in markovswitching model could share with my about the coding and technical detail of markovswitching model in Eviews as i'm not familiar with programming language and hope to learn more from here.
Thanks!!

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12388
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Markov switching model
It should be pointed out that EViews 8 has Markov Switching built in. Click for more details:
http://www.eviews.com/EViews8/ev8ecswitch_n.html
http://www.eviews.com/EViews8/ev8ecswitch_n.html
Follow us on Twitter @IHSEViews
Re: Markov switching model
Dear Gareth,
I used the Markov Switching model for particular series and the results were generated after 7 iterations. However, I forgot to save the equation, so the reestimated the equation and this time, the results were generated post 10 iterations. I faced two problems:
1. The results (coefficient estimates, pvalues, transition matrix summary) varied slightly.
2. The results which in the previous output window were under the head "Regime 1" were under the head "Regime 2" in the reestimated output, and viceversa.
I am a li'l more worried about the second issue. This is because, I wish to run MRSAR on multiple series and compare results across series. I am worried that I would not get to know if the regime 1 for one series becomes Regime 2 for another series.
Kindly help.
Thank you.
I used the Markov Switching model for particular series and the results were generated after 7 iterations. However, I forgot to save the equation, so the reestimated the equation and this time, the results were generated post 10 iterations. I faced two problems:
1. The results (coefficient estimates, pvalues, transition matrix summary) varied slightly.
2. The results which in the previous output window were under the head "Regime 1" were under the head "Regime 2" in the reestimated output, and viceversa.
I am a li'l more worried about the second issue. This is because, I wish to run MRSAR on multiple series and compare results across series. I am worried that I would not get to know if the regime 1 for one series becomes Regime 2 for another series.
Kindly help.
Thank you.
Re: Markov switching model
By default, EViews uses random search for initial parameter estimates. The results may drastically change especially in the case of complex dynamic models, where the solution has local roots. As for your second concern, please note that unlike other threshold models, Markov Switching type models do not label the regimes. Therefore, regimes are not really identified and can trade places.
Re: Markov switching model
Thank you so much for your quick reply Trubador
And thanks a lot for the explanation provided by you. Very helpful!
Warm Regards
And thanks a lot for the explanation provided by you. Very helpful!
Warm Regards
Re: Markov switching model
Dear Trubador,
I am estimating Multivariate Markov Switching model with Eviews8.
I am facing the convergence problem.
I run the model once and found convergence, but when I run the same model the following day, it say' convergence not achieved after certain iteration'.
How would I solve the problem?
Please help.
I am estimating Multivariate Markov Switching model with Eviews8.
I am facing the convergence problem.
I run the model once and found convergence, but when I run the same model the following day, it say' convergence not achieved after certain iteration'.
How would I solve the problem?
Please help.
Re: Markov switching model
Hello,
is it possible to get Rsquared when estimating Markov switching model?
Regards,
is it possible to get Rsquared when estimating Markov switching model?
Regards,

 EViews Developer
 Posts: 2627
 Joined: Wed Oct 15, 2008 9:17 am
Re: Markov switching model
It's not builtin since we're suspicious of the value of the statistic in this context. In principle, you could compute your own using the residuals provided from the estimation, but to be honest, I think the concept of an R2 in these models is ill defined.
Re: Markov switching model
EViews Glenn wrote:It's not builtin since we're suspicious of the value of the statistic in this context. In principle, you could compute your own using the residuals provided from the estimation, but to be honest, I think the concept of an R2 in these models is ill defined.
thank you Glenn..
Who is online
Users browsing this forum: Bing [Bot] and 5 guests