SWITCHREG

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

SWITCHREG

Postby maxchen » Tue Sep 01, 2015 2:47 am

EV 9 x86, 20150825

first, the data
rs.WF1
data workfile
(15.3 KiB) Downloaded 270 times

Code: Select all

setmaxerrs 1000
wfuse rs.wf1
equation eqb.switchreg(type=markov,heterr,s,coef=b) ds c df
freeze(tb00)  eqb.output



the error msg
Near singular matrix in computing the steady state probabilities in "EQUATION EQB.SWITCHREG(TYPE=MARKOV,HETERR,S,COEF=B) DS C DF".
EQB is not defined in "FREEZE(TB00) EQB.OUTPUT".


the estimation fail, however, the equation object EQB is not created. I think that EQB is first created, and then do the SWITCHREG

If I change the codes slightly

Code: Select all

setmaxerrs 1000
wfuse rs.wf1

equation eqb
eqb.switchreg(type=markov,heterr,s,coef=b) ds c df
freeze(tb00)  eqb.output

this time, I define the equation object first. the error msg:
Near singular matrix in computing the steady state probabilities in "DO_ EQB.SWITCHREG(TYPE=MARKOV,HETERR,S,COEF=B) DS C DF".
Equation estimates are not valid in "FREEZE(TB00) EQB.OUTPUT".


the freeze output is the eqb.spec



other suggestion: as viewtopic.php?f=8&t=12373
I hope that add one data member, such as eqb.@conv:
-1 if there is an error
0 if no convergence
1 if done
2 if "Failure to improve objective (non-zero gradients) after xxx iteration"

and add one data member for warnings, such as eqb.@warn:
0 no warning
1 "WARNING: Singular covariance - coefficients are not unique"

then the problem in viewtopic.php?f=4&t=12577 will handle more efficiently in prg mode.

maxchen
Posts: 191
Joined: Fri Oct 10, 2008 4:03 pm

Re: SWITCHREG

Postby maxchen » Tue Sep 01, 2015 3:01 am

The regime switching model is extremely volatile

Code: Select all

setmaxerrs 1000
wfuse rs.wf1

 equation eqb
 eqb.switchreg(type=markov,heterr,s,coef=b) ds c df
'equation eqb.switchreg(type=markov,heterr,s,coef=b) ds c df
freeze(tb00)  eqb.output

eqRS.switchreg(type=markov,heterr,rng=mt, seed=413176807,showopts)  ds c df
freeze(tb01) eqRS.output

' standard deviation (rng=mt, seed=1728250922)   
eqRS.switchreg(type=markov,heterr,rng=mt, seed=1728250922,showopts)  ds c df
freeze(tb02) eqRS.output

' standard deviation (rng=mt, seed=1440242362)
eqRS.switchreg(type=markov,heterr,rng=mt, seed=1440242362,showopts)  ds c df
freeze(tb03) eqRS.output

' standard deviation (rng=mt, seed=1161274805)
eqRS.switchreg(type=markov,heterr,rng=mt, seed=1161274805,showopts)  ds c df
freeze(tb04) eqRS.output

' standard deviation (rng=mt, seed=1814116667)
eqRS.switchreg(type=markov,heterr,rng=mt, seed=1814116667,showopts)  ds c df
freeze(tb05) eqRS.output


we may arrive at NA Std Error. see tb01 tb02
Even we are lucky to achieve convergence, the coefs may widely different, see tb03 tb04 and tb05


To estimate difficult models, EViews should provide additional data member, to aid in prg mode.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 14 guests