dynare thesisdynare4.mod;
irf1 = oo_.irfs;
save responsebase.mat irf1;

dynare thesisdynarenu.mod;
irf2 = oo_.irfs;
save responsenu.mat irf2;

dynare thesisdynaretheta.mod;
irf3 = oo_.irfs;
save responsetheta.mat irf3;

dynare thesisdynareeta.mod;
irf4 = oo_.irfs;
save responseeta.mat irf4;

dynare thesisdynarejoint.mod;
irf5 = oo_.irfs;
save responsejoint.mat irf5;

load('responsebase.mat','irf1');
load('responsenu.mat','irf2');
load('responsetheta.mat','irf3');
load('responseeta.mat','irf4');
load('responsejoint.mat','irf5');


ending_cell={'_eps_e'};
% 'y', 'bt','ct', 'cu', 'hc', 'hz','hu', 'dp', 'q', 'qz', 'r', 'l', 'dy', pit mc c Y n u lfp w Z
for ii=1:length(ending_cell)
    HOR=1:options_.irf;
    var={ 'pit', 'mc','c', 'Y', 'n', 'u', 'lfp', 'w', 'Z'};
    figure
    for jj=1:length(var)
        subplot(2,2,jj)
        eval(['irf1.' var{1,jj},ending_cell{1,ii}]);
        eval(['irf2.' var{1,jj},ending_cell{1,ii}]);
        eval(['irf3.' var{1,jj},ending_cell{1,ii}]);
        eval(['irf4.' var{1,jj},ending_cell{1,ii}]);
        eval(['irf5.' var{1,jj},ending_cell{1,ii}]);
        hold on
        plot(HOR,[eval(['irf1.' var{1,jj},ending_cell{1,ii}])],'-k',HOR,[eval(['irf2.' var{1,jj},ending_cell{1,ii}])],'--r', HOR,[eval(['irf3.' var{1,jj},ending_cell{1,ii}])], ':m' ,'LineWidth',1) ;
        title([var{1,jj}] )
    end
end