%This files produces table 2 of mono.tex. Table 2 contains second moments implied by the Ramsy allocation. %Input: markup MU %Output: the variables table (a table) and table_tex (its TEX readable version). %The colums of the table are: mean, std, acorr, corr(x,y), corr(x,g), and corr(x,z) %The rows are tau, pi, R, y, h, c. %Calls: simu.m and moments.m %(c) Stephanie Schmitt-Grohe and Martin Uribe clc clear all y=[];w=[];table=[];rows=[]; for mu=[1.35] MU=mu; for state0=1:4 [TAU(state0,:),R(state0,:),Y(state0,:),H(state0,:),C(state0,:),PAI(:,:,state0),G(state0,:),Z(state0,:),TM]=simu(state0,MU); end mtau = moments(TAU*100,Y,G,Z,TM); mR = moments((R-1)*100,Y,G,Z,TM); my = moments(Y,Y,G,Z,TM); mh = moments(H,Y,G,Z,TM); mc = moments(C,Y,G,Z,TM); mpai = mompai((PAI-1)*100,Y,G,Z,TM); tables = [mtau;mpai;mR;my;mh;mc]; %MAKE TABLE TEX READABLE rowss=['$\tau$ ';'$\pi$ ';'$R$ ';'$y$ ';'$h$ ';'$c$ ']; ys=['& ';'& ';'& ';'& ';'& ';'& ']; ws=['\\ ';'\\ ';'\\ ';'\\ ';'\\ ';'\\ ']; table=[table;tables] y=[y;ys]; w=[w;ws]; rows=[rowss;rows]; end disp('NOTE') disp('Columns: (1) mean, (2) std. dev., (3) auto corr., (4) corr(x,y), (5) corr(x,g), (6) corr(x,z) ') disp('Rows: (1) tax rate, (2) inflation, (3) nominal interest rate, (4) output, (5) hours, (6) consumption') table_tex=[rows y num2str(table(:,1),3) y num2str(table(:,2),3) y num2str(table(:,3),3) y num2str(table(:,4),3) y num2str(table(:,5),3) y num2str(table(:,6),3) w];