% Matlab File: plotimperbs.m % Chapter 14. Inflation stabilization % ERBS with sticky prices, CIA, and separable preferences (log) %June 2007 % This program is part of the book "Open Economy Macroeconomics in % Developing Countries" (forthcoming MIT Press) by Carlos A. Vegh. Use of % this program or modifications thereof should be acknowledged by citing % this manuscript. This program is a modification of the original % King-Plosser-Rebelo programs. I am grateful to Guillermo Vuletin for his % help in writing this program. % This program is to be used after implmbs.m to plot impulse response functions % Order of variables is: % States, exogenous, co-states, controls, and flows % Date k e epsilon lambda piN cT cN i TB % 1 2 3 4 5 6 7 8 9 10 % Program was modified to include the zero value in period zero % in the plot %clg %time = 1:nir; time = 0:nir; [dim1 dim2]=size(IR); PIR = [zeros(1,dim2) IR]; figure(1) subplot(221), plot(time,PIR(:,4),'-',time,zeros(size(time)),'.') title('Rate of devaluation') xlabel('time') subplot(222), plot(time, PIR(:,7),time,zeros(size(time)),'.') title('Consumption of tradables') xlabel('time') subplot(223), plot(time,PIR(:,10),time,zeros(size(time)),'.') title('Trade balance') xlabel('time') subplot(224), plot(time, PIR(:,8),time,zeros(size(time)),'.') title('Consumption of non-tradables') xlabel('time') % Date k e epsilon lambda piN cT cN i TB % 1 2 3 4 5 6 7 8 9 10 pause %clg figure(2) subplot(221), plot(time, PIR(:,6),time,zeros(size(time)),'.') title('Inflation of non-tradables') xlabel('time') subplot(222), plot(time,PIR(:,9),time,zeros(size(time)),'.') title('Nominal interest rate (i)') xlabel('time') subplot(223), plot(time,PIR(:,2),time,zeros(size(time)),'.') title('Net foreign assets') xlabel('time') subplot(224), plot(time,PIR(:,3),time,zeros(size(time)),'.') title('Real exchange rate') xlabel('time') clear time