Page 1 of 1
Markov Swithcing Estimation & Singular Covariance
Posted: Tue Jan 07, 2014 7:35 am
by athens
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.
Re: Markov Swithcing Estimation & Singular Covariance
Posted: Tue Jan 07, 2014 8:06 am
by trubador
Clear the Seed after each estimation and see if that works. Or it may simply because your data/parameters do not switch.
Re: Markov Swithcing Estimation & Singular Covariance
Posted: Tue Jan 07, 2014 8:21 am
by EViews Glenn
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.
Re: Markov Swithcing Estimation & Singular Covariance
Posted: Wed Jan 08, 2014 10:53 am
by athens
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.
Re: Markov Swithcing Estimation & Singular Covariance
Posted: Wed Jan 08, 2014 2:00 pm
by EViews Glenn
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]
Re: Markov Swithcing Estimation & Singular Covariance
Posted: Thu Jan 09, 2014 12:55 am
by athens
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.
Re: Markov Swithcing Estimation & Singular Covariance
Posted: Thu Jan 09, 2014 11:23 am
by EViews Glenn
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.
Re: Markov Swithcing Estimation & Singular Covariance
Posted: Sun Jan 12, 2014 12:38 am
by athens
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.
and using the following workfile
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.
Re: Markov Swithcing Estimation & Singular Covariance
Posted: Fri Jan 17, 2014 11:48 am
by EViews Glenn
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}