Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Use this forum for posting example programs or short bits of sample code.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by TomDoan »

The GRAPH still has only 3 series (response, upper and lower). You changed it to 5. (Doesn't the error message tell you where the error is?)
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by adrangi »

Hi Tom. I've been working with the EEV program on Rats. I've had mostly success after a few hiccups. I'm now trying to run a two variable case. I've had issues.

I've run two variables cases fine in the past with the attached program. I'm attaching the output and partial program with strange IRFs and a missing one as well. Questions:

1. Why am I missing the regime 2 IRF and why it looks odd.
2. Why are these copies so small and quite invisible. Any way around this?

3. Any other procedure that you recommend for cases that do the same thing and maybe easier and quicker to run and still give IRFs?
4. How can I get IRS from MSVAR? Any ideas?

As always, I'd appreciate any comments very much. All the best, Bahram
Attachments
rats_output_2vars_missing IRF.docx
(22.93 KiB) Downloaded 708 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by TomDoan »

This hasn't been adapted to the smaller model (shock-4 is "off the page")

graph(row=var,col=shock-4,max=%maximum,min=%minimum,nodates) 3

Obviously, you have more serious problems than a missing graph given the behavior of your responses. The EEV paper was written with the expectation (which seems to be met in their model) that the regimes can be separated largely on the variance of the oil variable (their variable 3) in the relabeling:

*
* Relabel if necessary. They are ordered based upon the variance of oil.
*
ewise voil(i)=sigmav(i)(3,3)
compute swaps=%index(voil)
if swaps(1)==2
disp "Draw" draw "Executing swap"

If your model doesn't satisfy that, then you probably won't get reasonable results.

I have no idea what question 4 means.
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by adrangi »

Hi Tom. Thanks much. I'll try one more run. Mind you I ran two variable models a while back in another paper. I used monetary base and equity indices in a bivariate framework! Seemed to work.

Sorry about the typo. Number 4 meant IRF from a MSVAR. I estimated a MSVAR for this project, however, from that one I can't get IRFs, is there a way that I can attach some lines of code to get the IRF from an MSVAR? I wanted to compare the two sets of IRFs and see what's going on.

Is ther ea way I can copy Rats graphs and magnify them a bit. As you see from my attached doc (last email) they ten to be very small and hard to read.

Thanks much for the helpful comments. Best, Bahram
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by TomDoan »

adrangi wrote:Hi Tom. Thanks much. I'll try one more run. Mind you I ran two variable models a while back in another paper. I used monetary base and equity indices in a bivariate framework! Seemed to work.

Sorry about the typo. Number 4 meant IRF from a MSVAR. I estimated a MSVAR for this project, however, from that one I can't get IRFs, is there a way that I can attach some lines of code to get the IRF from an MSVAR? I wanted to compare the two sets of IRFs and see what's going on.
You can get point estimates of IRF's from whichever estimation method you use. It's the error bands that require MCMC (or bootstrapping as EEV did, which is more complicated than MCMC).
adrangi wrote: Is ther ea way I can copy Rats graphs and magnify them a bit. As you see from my attached doc (last email) they ten to be very small and hard to read.
Your graph already runs the width of a page. If you want it bigger, you can rotate it to landscape mode (which is hard to read for other reasons) or go to one per page. A 2x2 IRF graph (or even 3x3 or 4x4) are fairly common in the literature.
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by adrangi »

Thanks. I'll try to get the IRFs without the confidence band to see! Best, Bahram
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by adrangi »

Hi Tom. I've been working on EEV regime switching model. As I wrote before, I had some strange output. I've got another set of output for another data set. Everything looks good except I'm still missing One IRF for the high volatility regime! This is exactly what happened when I was doing this with a different data set.

I think the problem is in the program I'm running and not the data set. Would you please look over my program, especially the IRF graphing part on the attached? Any input would be much appreciated and may getting me over the hurdle. Thanks much. Best, Bahram
Attachments
ratsout_eev_missingirf_forum.docx
(105.23 KiB) Downloaded 705 times
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by TomDoan »

I already commented several posts ago that this won't work:

do shock=1,2
graph(row=var,col=shock-4,max=%maximum,min=%minimum,nodates) 3

If shock is 1 or 2, then col=shock-4 is off the page.
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by adrangi »

Hi Tom. You're absolutely right. I was having other serious issues as well and forgot the response. Thanks much. I'll adjust it. This should do it. Best, BA
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by adrangi »

Hi Tom. I've tweaked the program. Changed the shock-2. I'm perplexed because I get stack of 2 sets of IRFs, but 3 out of the 4 materialize. I've checked the programming manual and unfortunately wasn't able to find helpful sections for this program. Do you suggest any sections of the manual that maybe helpful. I have ecourse material for VARs as well. Any suggestions are appreciated. Thanks. BA
adrangi
Posts: 45
Joined: Sun Sep 05, 2010 7:23 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by adrangi »

Hi Tom. Thanks for the comment. Everything seems to be working great. Thanks. I still want to get better with coding for IRFS. I've got old and new RATS manuals. Thanks for any leads. Best, BA
alexecon
Posts: 72
Joined: Fri Oct 30, 2015 12:16 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by alexecon »

Why does dropping the constant speed things up so much? In fact, with the constant included the redrawing of regimes -in almost each draw- is so extensive that I invariably give up! (I'm using my own data.) Thanks.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by TomDoan »

Probably because once you include the constant, there is no need for a second regime. It's the rejection of small sample size counts that causes it to go into infinite loops.
alexecon
Posts: 72
Joined: Fri Oct 30, 2015 12:16 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by alexecon »

This is very intuitive -thank you.
atarca
Posts: 25
Joined: Thu Dec 08, 2011 8:48 pm

Re: Ehrmann-Ellison-Valla(2003) Regime-dependent IRF's

Unread post by atarca »

Dear Tom,
I have a problem while running "EEV_MCMC.RPF". When I run this file subsequently I get different results in each trial. Moreover, in most of these trials I get a row or the rows stating "Draw XXXX Executing swap" in the estimation output although I keep using the same file. I cannot understand what is going wrong. Can you please help me?
Than you very much in advance.
Post Reply