Switching Regression

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

Switching Regression

Postby maxchen » Fri Jul 24, 2015 6:57 am

EV9 20150723 32bit

What is the meaning of the following line?
UG2, p469, The coefficients on the DLOGIDX(-1) both differ from zero with opposite (statistically significant) signs.


Now we turn to the following code

Code: Select all

tic wfopen "C:\EViews9\Example Files\EV9 Manual Data\Chapter 33 - Switching Regression\ew_excs.wf1" vector(5) vt smpl 1926M01 1986M12 !ns = 3 c = 0 'UG2 p473 equation eq01.switchreg(type=markov, nstates=!ns, heterr, startnum=200, startiter=50, rng=kn, seed=1727802456) excess vt(1) = @toc toc 'UG2 p474 freeze(tbtp1) eq01.transprobs 'One tricky aspect of imposing restrictions is that the regime identities are not fixed and can change for different starting values. matrix(!ns,!ns) mr = na mr(1,2) = 0 !nc = eq01.@ncoef vector(!nc) vi=eq01.@coefs vector(!nc-1) vi1 = vi.@droprow(5) do vi1.setglobalc tic equation eq02a.switchreg(type=markov, nstates=3, fprobmat=mr, heterr, s, startnum=200, startiter=50, seed=1727802456, rng=kn) excess 'init by EViews vt(5) = @toc toc 'UG2 p475 do vi1.setglobalc tic equation eq02.switchreg(type=markov, nstates=!ns, heterr, fprobmat=mr, s) excess 'WARNING: Singular covariance - coefficients are not unique vt(2) = @toc toc tic 'user coef coef(!nc-1) b = vi1 equation eq03.switchreg(type=markov, nstates=!ns, heterr, fprobmat=mr, s, coef=b) excess 'Convergence achieved after 0 iterations vt(3) = @toc toc
Discussion
1 eq02 vs eq03, the only diff is using coef b rathen than c, but eq02 Singular covariance, and eq03 Convergence achieved
2 eq02a, still init value provide EViews, option "startnum" override "s", with Failure to improve objective (non-zero gradients) after 1 iteration

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

Re: Switching Regression

Postby EViews Glenn » Fri Jul 24, 2015 3:28 pm

[edit] Sorry, the discussion is poor. It should be "The coefficients on the intercept in the mean equation both differ from zero with opposite (statistically significant) signs."

As to the other issue, it looks like a bug with setglobalc. We'll get a fix put in.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest