%AEASIM     Plot simulations generated by aea.f90.  See details about
%           model economy in Fortran code.

%           Ellen McGrattan, 12-01-01

load aea.dat
load nipa29_00.dat;
s      = aea(:,1);
t0     = 1925;
t1     = t0-1+length(s);
t      = [t0:t1]';
tby    = find(t==1929);
delta  = .0607;
grate  = 1.016*1.015;
nipa   = nipa29_00;
k      = aea(:,2);
cp     = aea(:,3);
hr     = aea(:,4);
ip     = aea(:,5);
gnp    = aea(:,6);
w      = aea(:,7);
r      = aea(:,8);
g      = aea(:,9);
taul   = aea(:,10);
tauk   = aea(:,11);
tauc   = aea(:,12);
taux   = aea(:,13);
z      = aea(:,14);
GNP    = gnp(tby);


figure(1)
  plot(t,gnp,'k-', t,cp, 'b-', t,ip, 'r-', t,g,  'g-', ...
       nipa(:,1),nipa(:,2),'k-.', ...
       nipa(:,1),nipa(:,3),'b-.', ...
       nipa(:,1),nipa(:,4),'r-.', ...
       nipa(:,1),nipa(:,5),'g-.');
  title('Real, Per-Capita, Detrended GNP and its Components   ')
  legend('GNP','Private Consumption', ...
         'Private Investment','Government Purchases')
  text(1934,-.1,'Model=Solid,Data=Dashdot')
  axis([t0,t0+14,-.2,1.2])

figure(2)
  plot(t,((1-delta)*k+ip)/grate,'k-',nipa(:,1),nipa(:,6),'k-.')
  title('Real, Per-Capita, Detrended End-of-period Capital Stock ')
  text(1934,1.5,'Model=Solid,Data=Dashdot')
  axis([t0,t0+14,1,3])

figure(3)
  plot(t,hr,'k-',nipa(:,1),nipa(:,7),'k-.')
  title('Hours per Working Age Person  ')
  text(1934,.15,'Model=Solid,Data=Dashdot')
  axis([t0,t0+14,.1,.4])

