Markov Swithcing Estimation & Singular Covariance

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

athens
Posts: 9
Joined: Thu Aug 02, 2012 1:35 pm

Markov Swithcing Estimation & Singular Covariance

Postby athens » Tue Jan 07, 2014 7:35 am

I am estimating a Markov regime switching regression model in E-views 8 of the following form:
equation eq1.switchreg(type=markov) y c y(-1) @nv d1 d2 d3
and when estimation stops I get NAs for SE, zStats and p-values and the following warning message:
"Singular covariance: coefficients are not unique".
I have tried different (user-supplied) initial probabilities, I have increased the number of random starts and iterations for starts but I always get the same estimation results. Any ideas on how I can reach to a solution with a non-singular covariance matrix;
Thank you in advance for your help.

trubador
Did you use forum search?
Posts: 1520
Joined: Thu Nov 20, 2008 12:04 pm

Re: Markov Swithcing Estimation & Singular Covariance

Postby trubador » Tue Jan 07, 2014 8:06 am

Clear the Seed after each estimation and see if that works. Or it may simply because your data/parameters do not switch.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Markov Swithcing Estimation & Singular Covariance

Postby EViews Glenn » Tue Jan 07, 2014 8:21 am

If that doesn't work, you might also want to try to specify your equation as

Code: Select all

equation eq1.switchreg(type=markov) y c ar(1) @nv d1 d2 d3
which will imply a slightly different dynamic process for the switching along the lines of Hamilton.

athens
Posts: 9
Joined: Thu Aug 02, 2012 1:35 pm

Re: Markov Swithcing Estimation & Singular Covariance

Postby athens » Wed Jan 08, 2014 10:53 am

Indeed, the Hamilton model with AR terms works better. But now a new problem arised. When I change the sample size in regime switching estimation (to 186 observations) the program crashes and a message that Eviews 8 has stopped working appears. Is this a bug or something else? Thanks a lot for your help.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Markov Swithcing Estimation & Singular Covariance

Postby EViews Glenn » Wed Jan 08, 2014 2:00 pm

Crashing is definitely a bug. What's the build-date of your copy of EViews (Help/About EViews). I think there was something early on that caused problems.

[posting your workfile here, or sending to support@eviews.com with a brief description of the steps leading to the problem will help as well]

athens
Posts: 9
Joined: Thu Aug 02, 2012 1:35 pm

Re: Markov Swithcing Estimation & Singular Covariance

Postby athens » Thu Jan 09, 2014 12:55 am

I use the latest updated version of Eviews 8. I found the reason for e-views crashing. When I use a shorter sample in the regime switching estimation one of the dummy variables is always zero. But I guess this is still a bug since e-views should probably give a message and not crash.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Markov Swithcing Estimation & Singular Covariance

Postby EViews Glenn » Thu Jan 09, 2014 11:23 am

Yes, it should not crash. Could you please send a workfile with the data and a brief description of how to reproduce the bug to support@eviews.com? That would greatly help us find the problem.

Thanks.

athens
Posts: 9
Joined: Thu Aug 02, 2012 1:35 pm

Re: Markov Swithcing Estimation & Singular Covariance

Postby athens » Sun Jan 12, 2014 12:38 am

Thank you for your prompt answer. I have sent the bug report to eviews support. Meanwhile, I have one more question. I am using regime switching estimation for forecasting in the eviews program I attach.
rs_forecast.prg
(386 Bytes) Downloaded 414 times
and using the following workfile
regswitchforecasting.wf1
(226.82 KiB) Downloaded 306 times
However, in each loop I have to check whether any of the dummy variables is always zero for the specific sample and not include those equal to zero in equation as dependent. I know how to do this writing lots of lines of code with if statements and checking for all combinations of dummy variables each time but I was wondering whether there is a shorter way to do this. I would be grateful for any suggestions.

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Markov Swithcing Estimation & Singular Covariance

Postby EViews Glenn » Fri Jan 17, 2014 11:48 am

The crashing bug has been fixed and the fix will appear in the next patch.

As to the other question, not sure this is easier than what you are doing, but this will do it as well

Code: Select all

%include_str = "" for %test month12 month10 month8 month7 month6 month4 month3 if (@var({%test}) > 0) then %include_str = %include_str + " " + %test endif equation eqf.switchreg(type=markov) eurusd c ar(1) @nv {%include_str}


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests