Open OliverSnellman opened 6 years ago
Hi Oliver
The last syntax is correct (or alternatively, you could use all(S(1,1,1:4)>0) ... note the all( ) function wrapping the expression). Could you please send me the code complete with your data? I'll have a look. It could simply really be that the space where all the restrictions hold at the same time is really tiny given you data, and hence it takes very very long for the resampling algorithm to come up with a sufficient number of rotations...
Best, Jaromir
On Tue, Sep 18, 2018 at 2:24 PM OliverSnellman notifications@github.com wrote:
Hi,
I would like to identify four structural shocks from a 6 variable VAR with Sign Restrictions, by demanding that the shocks have strictly positive or negative impulse responses on certain variables for four consecutive periods.
I have seen examples, where either only the first period responses of IRFs are restricted
'S(1,1,1) > 0 ', ... % positive contemporaneous impact of first shock on first variable '&& S(3,1,1) < 0 ', ... % negative contemporaneous impact of first shock on third variable etc.
or where the sums of response values from n=4 periods are restricted
'sum(S(1,1,1:4)) > 0 ', ...
where the IRFs can alternate signs during the first 4 periods as long as the signs of their sums are correct.
When I tried the following specification
'S(1,1,1:4) > 0 ', ...
it gave an error message about logical strings not evaluating correctly, and the following specification takes forever to run
'S(1,1,1) > 0 ', ... '&& S(1,1,2) > 0 ', ... '&& S(1,1,3) > 0 ', ... '&& S(1,1,4) > 0 ', ...
Is there a handy way to identify a SVAR model by demanding the chosen sign restriction to apply n=4 periods in a row?
Cheers, Oliver
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/IRIS-Solutions-Team/IRIS-Toolbox/issues/151, or mute the thread https://github.com/notifications/unsubscribe-auth/AYVVKs4pSX8vW4vnwhc2eUaOen-vS5Bgks5ucOXjgaJpZM4WtzYC .
Hi Jaromir,
Thank you for the rapid answer! You will find the code and data attached. The work is still in progress, but I tried to clean up the code a bit.
I might also ask how to construct 90% confidence intervals for the structural IRFs? If I choose among the models which are sorted by their squared distance to the means, how do I identify the upper and lower bound models? Do I sort the models again but separately for models below and above the respective medians, and multiply the IRFs of the 95th% model (or models in IRFwise ci) on the below group by (-1)? Or do I bootstrap from the approximated posterior distribution of the structural models somehow?
Best regards, Oliver
Hi,
I would like to identify four structural shocks from a 6 variable VAR with Sign Restrictions, by demanding that the shocks have strictly positive or negative impulse responses on certain variables for four consecutive periods.
I have seen examples, where either only the first period responses of IRFs are restricted
'S(1,1,1) > 0 ', ... % positive contemporaneous impact of first shock on first variable '&& S(3,1,1) < 0 ', ... % negative contemporaneous impact of first shock on third variable etc.
or where the sums of response values from n=4 periods are restricted
'sum(S(1,1,1:4)) > 0 ', ...
where the IRFs can alternate signs during the first 4 periods as long as the signs of their sums are correct.
When I tried the following specification
'S(1,1,1:4) > 0 ', ...
it gave an error message about logical strings not evaluating correctly, and the following specification takes forever to run
'S(1,1,1) > 0 ', ... '&& S(1,1,2) > 0 ', ... '&& S(1,1,3) > 0 ', ... '&& S(1,1,4) > 0 ', ...
Is there a handy way to identify a SVAR model by demanding the chosen sign restriction to apply n=4 periods in a row?
Cheers, Oliver