% % Economics 303: % Graphs for Lecture on Consumption Theory % % George J Hall % Brandeis University % September 2006 % close all clear % % First, load real disposable income % load DSPIC96.DAT year = DSPIC96(:,1); mth = DSPIC96(:,2); day = DSPIC96(:,3); DPI = DSPIC96(:,4); date = year + (mth-1)/12; % % Second, load real personal consumption expenditures % load PCEC96.DAT year = PCEC96(:,1); mth = PCEC96(:,2); day = PCEC96(:,3); PCE = PCEC96(:,4); date = year + (mth-1)/12; figure(1) plot(date,PCE./DPI) xlabel('date (year)'); ylabel('fraction'); title('Consumption as a fraction of disposable income'); hold on disp('i am pausing, hit the enter key to continue'); pause T = length(date); lfd_dpi = (log(DPI(2:T))-log(DPI(1:T-1))); lfd_pce = (log(PCE(2:T))-log(PCE(1:T-1))); figure(2) plot(date(1:T-1),lfd_dpi,'b-',date(1:T-1),lfd_pce,'g-',date(1:T-1),zeros(T-1,1),'r'); xlabel('date(year)'); ylabel('first differences (in logs)'); title('LOG FIRST DIFFERENCES IN DPI and PCE'); disp('i am pausing, hit the enter key to continue'); pause % % Load real GDP % load GDPC1.DAT year = GDPC1(49:238,1); mth = GDPC1(49:238,2); day = GDPC1(49:238,3); RGDP = GDPC1(49:238,4); date = year + (mth-1)/12; figure(3) plot(date,PCE(1:3:T-2)./RGDP) xlabel('date (year)'); ylabel('fraction'); title('Consumption as a fraction of GDP');