%MAIN     This code is used to generate results in 
%
%           Technology Capital and the US Current Account
%           Staff Report 406, by Ellen McGrattan and Edward Prescott
%
%         To check sensitivity of parameter choices, use altparams.m.

%         Ellen McGrattan, 1-15-08
%         Revised, ERM, 1-15-08


%
% Benchmark parameters and initial guess for equilibrium
%
clear
disp(' Which model? ')
disp('   1. benchmark')
disp('   2. delta_M = 0%')
disp('   3. delta_M = 16%')
disp('   4. phi = 8%')
disp('   5. phi = 6%')
disp('   6. delta_I = 6%')
disp('   7. alpha_I = 10%')
disp('   8. tau_c = 40%')
disp('   9. tau_l = 40%')
disp('  10. nr constant after 2010')
disp('  11. s^f_u constant')
disp('  12. sigmas constant')
disp('  13. sigmas, s^f_u constant')
nyr = 5;
icase = input(' Model =  ');
if icase==1;  benchmark; end;
if icase==2;  altdeltM1; end;
if icase==3;  altdeltM2; end;
if icase==4;  altphi1;   end;
if icase==5;  altphi2;   end;
if icase==6;  altdeltI1; end;
if icase==7;  altalphI1; end;
if icase==8;  alttauc;   end;
if icase==9;  alttaul;   end;
if icase==10; altfutnr;  end;
if icase==11; altsfun;   end;
if icase==12; altopen1;  end;
if icase==13; altopen2;  end;

%
% Compute equilibrium 
%
X1    = secant('fdifoc',X0(:),param);

%
% Main results
%
X0    = X1;
param = [param;nyr];

results
