function plot_data(simcase); % function plot_data(case); % Plots data generated by the MATLAB script sim_model.m % Author: Klaus Reiner Schenk-Hoppé (klaus@iew.unizh.ch) % Last update: August 15, 2000 if (simcase == 1), load case1data; else load case2data; end; fig1 = figure; hold plot(timeaxis(1:M),z(1:M),'-b'); plot([timeaxis(1),timeaxis(M)],[1,1],'-k') grid on axis('tight') title('Total units of labor employed z_t. The time scale is in years and divided into quarters.'); %print -depsc2 figure1.eps fig2 = figure; hold plot(timeaxis(1:M),1+eta(1:M),'-b'); plot([timeaxis(1),timeaxis(M)],[1.02,1.02],'-k') grid on axis('tight') title('Rate of labor-augmenting technical progress 1+eta_{t+1}.'); %print -depsc2 figure2.eps fig3 = figure; hold plot(timeaxis(1:M),l_detrended_LogGDP(1:M),'-b') plot(timeaxis(1:M),HPtrendGDP(1:M) - lr_dataLogGDP(1:M),'-g') plot(timeaxis(1:M),BPtrendGDP(1:M) - lr_dataLogGDP(1:M),'-m') plot(timeaxis(1:M),l_detrended_LogTechnProg,'-r') plot([timeaxis(1),timeaxis(M)],[0,0],'-k') grid on axis('tight') title('Deviation from linear trend of log(Y_t): data (blue), HP(1600) trend (green), BP(6,32,12) trend (magenta), and linear detrended log(a_t) (red)') %print -depsc2 figure3.eps fig4 = figure; hold plot(timeaxis(1:M),HPGDP(1:M),'-g') plot(timeaxis(1:M),BPGDP(1:M),'-m') plot(timeaxis(1:M),l_detrended_LogGDP(1:M)-l_detrended_LogTechnProg,'-b') plot([timeaxis(1),timeaxis(M)],[0,0],'-k') axis('tight') title('Business cycles of GDP (deviation of log(Y_t) from different trends): HP(1600) trend (green), BP(6,32,12) trend (magenta), sum of the linear detrended log(a_t) data and linear trend of log(Y_t) (blue)') %print -depsc2 figure4.eps time1 = 27*4; time2 = M; %time1 = 1; %time2 = M; fig5 = figure; hold plot(timeaxis(time1:time2),HPWageIncome4(time1:time2),'-r') plot(timeaxis(time1:time2),HPWageIncome40(time1:time2),'-g') plot(timeaxis(time1:time2),HPWageIncome400(time1:time2),'-c') plot(timeaxis(time1:time2),BPWageIncome(time1:time2),'-m') plot(timeaxis(time1:time2),l_detrended_LogWageIncome(time1:time2)-l_detrended_LogTechnProg(time1:time2),'-b') plot([timeaxis(time1),timeaxis(time2)],[0,0],'-k') axis('tight') title('Business cycles of wage income (deviation of log(w_t) from different trends): HP(4) trend (red), HP(40) trend (green), HP(400) trend (cyan), BP(6,32,12) trend, sum of the linear detrended log(a_t) data and linear trend of log(w_t)') %print -depsc2 figure5.eps HP200 = hpfilter(log(TotalOutput(1:M)),200)*transpose(log(TotalOutput(1:M))); HP3200 = hpfilter(log(TotalOutput(1:M)),3200)*transpose(log(TotalOutput(1:M))); HP6400 = hpfilter(log(TotalOutput(1:M)),6400)*transpose(log(TotalOutput(1:M))); fig5c = figure; hold plot(timeaxis(1:M),l_detrended_LogGDP(1:M)-l_detrended_LogTechnProg,'-b'); plot(timeaxis(1:M),HP6400(1:M),'-m'); plot(timeaxis(1:M),HP3200(1:M),'-g'); plot(timeaxis(1:M),HP200(1:M),'-r'); grid on axis('tight') title('Business cycles of GDP (deviation of log(Y_t) from different trends): HP(6400) trend (magenta), HP(3200) trend (green), HP(200) trend (red), sum of the linear detrended log(a_t) data and linear trend of log(Y_t) (blue).'); %print -depsc2 figure5c.eps