Error bands in NEAR-VAR with short and long-run restrictions

Questions and discussions on Vector Autoregressions
Yashodha
Posts: 35
Joined: Wed May 04, 2016 12:30 am

Error bands in NEAR-VAR with short and long-run restrictions

Unread post by Yashodha »

Hi,
I am trying to do a SVAR model with block exogeneity and short-run and long-run restrictions. My code is attached. My model is a just-identified model so I used part of the code in montesur.RPF to get the error bands for my impulse responses. I have encountered with two problems.

a) All my impulse responses seem fine, except for the error band at the initial period. In the initial period there is no 'error band' since both upper bound and lower bound lines touch the median line (i.e. impulse response line). To make my point more clear, I have marked this in the Impulse Responses example file. I get this problem for all the IRFs. I am fairly new to RATS and also for SVAR modelling. So I am not sure whether this normal. But in most published papers there is an error band around the initial response in IRF graphs, so I thought it is unusual. So where have I gone wrong in my coding?

b) My REER variable in the model is in difference form. I want to get REER in levels in my IRFs. So how can I get accumulated effects. I tried to use 'accumulate=||7||' option under @MCGraphIRF, but I get very weird IRFs.

I would be really thankful if you could help me to resolve these issues.
Last edited by Yashodha on Fri Jul 26, 2019 1:43 am, edited 1 time in total.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Error bands in NEAR-VAR with short and long-run restrict

Unread post by TomDoan »

You're not recomputing the factor inside the Monte Carlo loop---the impact B's are computed just once outside the loop, so they don't change. Look at the Bjornland-Leitemo example for recomputing the SRLR factor inside the loop.
Yashodha
Posts: 35
Joined: Wed May 04, 2016 12:30 am

Re: Error bands in NEAR-VAR with short and long-run restrict

Unread post by Yashodha »

Thank you very much for your prompt reply.

As you suggested I went through Bjornland-Leitemo example. I understand that they have used the SRLRFactor inside the Monte Carlo loop, but they use that SRLRFactor as an option under @MCVARDoDraws. In my case, I am using Gibbs sampling and I can't figure out how to use a SRLRFactor within that set-up.

Since I am a layman to RATS programming I would highly appreciate if you could explain me how to recompute the SRLRFactor within Monte Carlo loop.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Error bands in NEAR-VAR with short and long-run restrict

Unread post by TomDoan »

Just insert the @ShortAndLong between the compute sigmad and the impulse:

compute sigmad=inv(hdraw)
@ShortAndLong(lr=lr,sr=sr,masum=inv(%modellagsums(SL_model))) sigmad b
impulse(noprint,model=SL_model,factor=b,$
steps=nsteps,flatten=%%responses(draw))
Yashodha
Posts: 35
Joined: Wed May 04, 2016 12:30 am

Re: Error bands in NEAR-VAR with short and long-run restrict

Unread post by Yashodha »

Thank you very much. You saved the day for me. :)

Could you also help me on my second issue, which is on how to get accumulated effect on REER variable.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Error bands in NEAR-VAR with short and long-run restrict

Unread post by TomDoan »

Thanks for pointing that out. Yes, the ACCUM options wasn't set up properly. I corrected the web copy of it. The link is on

https://estima.com/forum/viewtopic.php?f=7&t=995

(You can also do Help-Update Procedures in RATS to update the copy on your computer).
Yashodha
Posts: 35
Joined: Wed May 04, 2016 12:30 am

Re: Error bands in NEAR-VAR with short and long-run restrict

Unread post by Yashodha »

Thanks a million.
Post Reply