Question about SVAR and shock contributions

110 views
Skip to first unread message

Mikko S

unread,
Jan 26, 2014, 5:12:22 AM1/26/14
to iris-t...@googlegroups.com

Hi!
I have a question about SVAR and shock contributions.

I ran the tutorial code var_basics available on iris web site. Then with two commands (below) I simulate the SVAR  and calculate the difference between the data and the sum of shock contributions. The result seems to me be bigger than epsilon (at least 0.05 and 0.25 depending on variable).

Shouldn’t the difference be zero (like in DSGE models)? I thought the shock contributions always sum up to the observed variable.


% SVAR simulation
c = simulate(sv,sdata,1:30,'deviation',true,'contributions',true);

% Difference btw data and sum of contributions
abs(sdata{:,1:3} - (c{:,1:3,1}+c{:,1:3,2}+c{:,1:3,3}) )
 
BR
Mikko

Jaromir Benes

unread,
Mar 20, 2014, 3:23:36 PM3/20/14
to iris-t...@googlegroups.com
Hi Mikko

There was a bug relating to the fact that using tseries as input/output data from/to VAR and SVAR objects is now considered obsolete and will be removed from a future version of IRIS. The supported format is a database (struct).

I have fixed the bug anyway, so it should run ok now (check also out the new tutorial on Introduction to VAR Modeling in IRIS).

Also note two things:

* You should not use the option 'deviation=' true unless you remove the VAR-estimated mean from the data -- in which case you want both the input and output data to be interpreted as deviations from that mean. This is not the case in your case -- here, it is a coincidence because the VAR was actually estimated with an assumption of a zero mean.

* As in DSGE models, there is the N+1-th contribution of the initial condition and the deterministic constant terms. The proper add up should therefore, in general run as far as the N+1 page in the tseries object, where N is the number of shocks

c{:,1:3,1}+c{:,1:3,2}+c{:,1:3,3}+c{:,1:3,4}

Again, because the VAR was estimated with a zero constant assumption, this is not necessary in this particular case.

Note that you can use the command sum(c,3) (i.e. run summation in third dimension) to replace the manual sum above.

Let me know if everything's all right.

Best,
Jaromir
Reply all
Reply to author
Forward
0 new messages