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.
Markov Swithcing Estimation & Singular Covariance
Moderators: EViews Gareth, EViews Moderator
Re: Markov Swithcing Estimation & Singular Covariance
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
If that doesn't work, you might also want to try to specify your equation as
which will imply a slightly different dynamic process for the switching along the lines of Hamilton.
Code: Select all
equation eq1.switchreg(type=markov) y c ar(1) @nv d1 d2 d3Re: Markov Swithcing Estimation & Singular Covariance
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
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]
[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
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
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.
Thanks.
Re: Markov Swithcing Estimation & Singular Covariance
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.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Markov Swithcing Estimation & Singular Covariance
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
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}
Who is online
Users browsing this forum: No registered users and 2 guests
