%NOINTANG_   Start with 1990 levels for GDP, value-added in the nonbusiness
%   Steady   sector, consumption, tangible investment, tangible investment
%            in the nonbusiness sector, tax rates, and tangible capital
%            in the business sector.  Use these observations to set 
%            parameters for a business cycle model with variations in 
%            TFP, tax rates, a "labor wedge", and an "investment wedge".
%            See details in the Appendix to:
%
%               Unmeasured Investment and the Puzzling 1990s US Boom
%               by Ellen McGrattan and Ed Prescott
                                                                                
%            Ellen McGrattan, 11-1-05
%            Revised, ERM, 8-27-07

%---------------------------------------------------------------------
% 1. Observed levels

GDPs       = 1;
cs         = .7626*GDPs;
xms        = .2377*GDPs;
xns        = .1325*GDPs;
yns        = .3379*GDPs;
hs         = .2751;
hns        = .0611;
tauc       = .0657;
tauh       = .3109; 
kbs        = 1.74/1.047*GDPs;
NIPAptax   = .025/1.047*GDPs;

%
% 2. Fixed parameters
%

beta       = .98;
eta        = .01;
gamma      = .02;
sigma      = 1.000001;
taup       = .35;
taud       = .15;
taux       = 0;
bhat       = beta*(1+gamma)^(-sigma);
grate      = (1+eta)*(1+gamma);

% 3. Implied parameters
%

ybs        = GDPs-yns;
xbs        = xms-xns;
gs         = GDPs-cs-xms;
hbs        = hs-hns;
tauk       = NIPAptax/kbs;
delta      = xbs/kbs+ 1-grate;
theta      = ((1-bhat*(1-delta))*(1+taux)-bhat*taup*delta+ ...
              bhat*(1-taup)*tauk)/ (bhat*(1-taup)) * kbs/ybs;
thet1      = 1-theta;
psi        = (1-tauh)*thet1*(1-hs)*ybs/((1+tauc)*cs*hbs);
zbs        = ((kbs/ybs)^theta)^(-1/thet1)*ybs/hbs;


% 4. Write out results
%
fid    = fopen('nointang_params.m','w');
fprintf(fid,'beta       = %11.8f;\n',beta);
fprintf(fid,'delta      = %11.8f;\n',delta);
fprintf(fid,'eta        = %11.8f;\n',eta);
fprintf(fid,'gamma      = %11.8f;\n',gamma);
fprintf(fid,'psi        = %11.8f;\n',psi);
fprintf(fid,'sigma      = %11.8f;\n',sigma);
fprintf(fid,'theta      = %11.8f;\n',theta);
fprintf(fid,'zbs        = %11.8f;\n',zbs);
fprintf(fid,'gs         = %11.8f;\n',gs);
fprintf(fid,'taucs      = %11.8f;\n',tauc);
fprintf(fid,'tauhs      = %11.8f;\n',tauh);
fprintf(fid,'taups      = %11.8f;\n',taup);
fprintf(fid,'tauks      = %11.8f;\n',tauk);
fprintf(fid,'tauds      = %11.8f;\n',taud);
fprintf(fid,'tauxs      = %11.8f;\n',taux);
fprintf(fid,'kbs        = %11.8f;\n',kbs);
fprintf(fid,'xbs        = %11.8f;\n',xbs);
fprintf(fid,'xns        = %11.8f;\n',xns);
fprintf(fid,'xms        = %11.8f;\n',xms);
fprintf(fid,'hbs        = %11.8f;\n',hbs);
fprintf(fid,'hns        = %11.8f;\n',hns);
fprintf(fid,'hs         = %11.8f;\n',hs);
fprintf(fid,'ybs        = %11.8f;\n',ybs);
fprintf(fid,'yns        = %11.8f;\n',yns);
fprintf(fid,'gdps       = %11.8f;\n',ybs+yns);
fclose(fid);
