Make backward model IRF routine also return the impulses.

- In the second output argument (a dseries object) where we store the baseline
   scenario for the endogenous variables we add the baseline for the exogenous
   variables).

 - In the third output argument (a structure of dseries objects, one field per
   shock scenario), we also store the impulses considered for generating the
   IRFs.
time-shift
Stéphane Adjemian(Charybdis) 2017-11-16 17:54:00 +01:00
parent dc670e0199
commit 6e527b467d
1 changed files with 2 additions and 0 deletions

View File

@ -196,9 +196,11 @@ for i=1:length(listofshocks)
deviations.(name) = alldeviations{listofvariables{:}};
if nargout>2
irfs.(name) = allirfs{listofvariables{:}};
irfs.(name) = [irfs.(name) dseries(innovations, initialcondition.last+1, exonames)];
end
end
if nargout>1
baseline = dseries(transpose(endo_simul__0), initialcondition.init, endonames(1:M_.orig_endo_nbr), cellstr(DynareModel.endo_names_tex(1:M_.orig_endo_nbr,:)));
baseline = [baseline, innovationbaseline];
end