IRFs to 1 unit shock

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

IRFs to 1 unit shock

Postby melma » Fri Nov 27, 2009 5:28 pm

Is it possible to get dynare to compute IRFs to 1 unit shock? I could find options only for 1sd and relative IRFs based on 1sd shock.
Thank you,
MArtin
melma
 
Posts: 1
Joined: Fri Nov 27, 2009 5:22 pm

Re: IRFs to 1 unit shock

Postby pakocica » Fri Nov 27, 2009 7:06 pm

Dear MArtin,
I was facing the same problem recently. Look at the file C:\Program Files\dynare\matlab\PosteriorIRF.m. In the version 4.0.3 you find the following code:
Code: Select all
    SS(M_.exo_names_orig_ord,M_.exo_names_orig_ord) = M_.Sigma_e+1e-14*eye(M_.exo_nbr);
    SS = transpose(chol(SS));
    for i = 1:M_.exo_nbr
        if SS(i,i) > 1e-13
            y=irf(dr,SS(M_.exo_names_orig_ord,i), options_.irf, options_.drop,options_.replic,options_.order);
            if options_.relative_irf
                y = 100*y/cs(i,i);
            end
            for j = 1:nvar
                if max(y(IndxVariables(j),:)) - min(y(IndxVariables(j),:)) > 1e-12
                    stock_irf_dsge(:,j,i,irun) = transpose(y(IndxVariables(j),:));
                end
            end
        end


I think this is an error, there should be y = 100*y/SS(i,i); in order to make the relative shock work. This will give you shock IRF in mean of % of the original shock. Actually the interpretation depends on the measure unites of the shock and the observable variables. I did a lot of practical modification to the code of the function PosteriorIRF.m, if you wanna share some ideas, please email me or contact me on Skype (pakocica).

Regards,
Pavel
pakocica
 
Posts: 46
Joined: Fri Nov 27, 2009 6:42 pm
Location: Taiwan (come from Prague)


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests