Page 1 of 1
SWARCH
Posted: Thu Jul 30, 2009 3:32 am
by rtlee100
Hi,
I was wondering if somebody could help me regarding the running of MARKOV.SRC and SWARCH.PNG.
I am currently trying run the Markov Switching ARCH model as provided by RATS but I get the following messege and was wondering what I might be doing wrong that is causing this issue as I am basically trying to run the original program with my own data (the same issue occurs when I used the data provided).
Is there any was to attempt to fix this?
I am trying to run this as part of my disstertaion which is due to be completed in the next month.
MAXIMIZE - Estimation by BHHH
NO CONVERGENCE IN 5 ITERATIONS
LAST CRITERION WAS 0.0000000
ESTIMATION POSSIBLY HAS STALLED OR MACHINE ROUNDOFF IS MAKING FURTHER PROGRESS DIFFICULT.
TRY HIGHER SUBITERATIONS LIMIT, TIGHTER CVCRIT, DIFFERENT SETTING FOR EXACTLINE OR ALPHA ON NLPAR.
RESTARTING ESTIMATION FROM LAST ESTIMATES OR DIFFERENT INITIAL GUESSES MIGHT ALSO WORK
Weekly Data From 1983:06:03 To 2009:07:17
Usable Observations 1364
Function Value -4075.07154683
Any insight into solving this issue would be greatly appreciated.
Regards,
Rob.
Re: SWARCH
Posted: Thu Jul 30, 2009 11:42 am
by TomDoan
- Are you doing PMETHOD=SIMPLEX? If not, include it on your MAXIMIZE with a PITER of say 5 or 10.
- If you're having convergence problems, I generally don't recommend using METHOD=BHHH. That uses an approximation for the curvature which is only correct near the optimum. Try METHOD=BFGS instead. If you want the BHHH covariance matrix, you can do one iteration of BHHH after BFGS finds the optimum.
If neither of those work, you'll have to send code and data to
support@estima.com.
Re: SWARCH
Posted: Thu Jul 30, 2009 12:09 pm
by rtlee100
Hi Tom,
Thanks for your quick response, I unfortunately tried these solutions previously and just did there again and I still get the same convergence issue.
I will send on the code and the data, I have however not amended the code (other than amending to try figure out the error) as provided on the Estima website with respect to MARKOV.SRC and SWARCH.PNG.
Thanks,
Rob.
Re: SWARCH
Posted: Thu Jul 30, 2009 2:52 pm
by TomDoan
If you look at your results, you'll see that the P(1,3) element has gone negative. That happens in the SWARCH.PRG example as well, which is why there's the PEG13 parmset. You'll need to do that as well.
It's also not clear that your model needs three states. If two states are adequate, then the model has a number of parameters which aren't identified, and you'll have all kinds of optimization problems. When I fixed the P(1,3) at zero, it rather quickly got a P(2,1) going negative. Now a zero transition probability from 1->3 or 3->1 isn't that surprising. If there's a zero probability moving between adjacent states, that's a good sign that the model has a redundant state.
Re: SWARCH
Posted: Sat Aug 01, 2009 10:13 am
by rtlee100
I just used the 3 states as that was the default option in the code and as such I have no issue with only using a 2 state model and will use it gladly if I can get it to converge.
Where is PEG13 parmset?
Also how did you fix the P(1,3) at zero?
How can set up the mode so that I get a 2 state model to converge?
Apologies for the questions if they are not very smart but unfortubatley I am not too much of an expert on RATS and have only recently started using it in attempt to solve the SWARCH model estimation and am using for of its other etimation and testing functionality.
Thanks again,
Rob.
Re: SWARCH
Posted: Sun Aug 02, 2009 6:44 am
by TomDoan
rtlee100 wrote:I just used the 3 states as that was the default option in the code and as such I have no issue with only using a 2 state model and will use it gladly if I can get it to converge.
Where is PEG13 parmset?
Also how did you fix the P(1,3) at zero?
From the SWARCH.PRG example:
Code: Select all
*
* It turns out that p(1,3) is on the boundary, so we add the constraint to peg it
* at that value.
*
nonlin(parmset=peg13) p(1,3)=0
maximize(start=(pstar=%mcergodic(p)),parmset=meanparms+archparms+msparms+peg13,$
method=bhhh,iters=400,pmethod=simplex,piters=5) logl 3 *
Without the +peg13 on the MAXIMIZE, it tries to estimate all the parameters in P. With the +peg13, it fixed p(1,3) at zero.
rtlee100 wrote:How can set up the mode so that I get a 2 state model to converge?
Change the following lines in the existing program:
Code: Select all
compute hv=||10,100||
compute p=||.8,.2,.05|.2,.6,.4||
The first one obviously changes to nstates=2. The second needs just one relative variance; probably something like
The third one just needs a 1x2 matrix. A guess value of
should probably work fine.
Re: SWARCH
Posted: Tue Aug 04, 2009 2:51 am
by rtlee100
Thanks for that, I have managed to get it to converge with 2 states so I now need to analyse the results.