Hamilton Regime Switching Example

Discussion of models with structural breaks or endogenous switching.
timduy
Posts: 50
Joined: Sun Jan 15, 2012 12:24 am

Hamilton Regime Switching Example

Unread post by timduy »

Trying to track down a change in the msvarsetup.src procedure. When I applied an earlier version to the hamp697.rpf example (regime switching in US GDP), the probabilities were in the expected range 1 for recession to 0 for expansion. When I applied the most recent version of the msvarsetup.src procedure, the probabilities were backwards. I solved this by changing set pcontract gstart gend = psmooth(t)(2) to set pcontract gstart gend = psmooth(t)(1) in the hamp697.rpf file. Sadly, I wrote over the original msvarsetup.src file (from a load of RATS 8.0), and now can't track down what changed between versions to switch the states probabilities. Any ideas?
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Hamilton Regime Switching Example

Unread post by TomDoan »

The current @MSVARSETUP initializes the mean parameters to run from low to high (through @MSVARINITIAL). This was changed in April 2011 when we added the SWITCH option. With that change, the following is the correct way to get the probability of contraction:

set pcontract gstart gend = psmooth(t)(1)
Post Reply