i have used the following code to generate the impulse response result tables successfully, however, i don't know how to plot these impulse responses using codes in this context. i urgently need the solution. " data dd1; set work.dd; /* Choose a period */ if Year= 2015.4 then output; run; filename c1 "/home/m182679152860/myfolder/Impulses_2015q4.xls"; /* Excel file output name */ /* Macro to show impulse responses */ %macro impulse(nnctry,nnperiod); %do k = 1 %to &nnctry; %let ctry = P[&k,1:&nnctry]; %do n = 2 %to &nnperiod;" %let m1 = %eval(&nnctry*(&n-1)+1); %let m2 = %eval(&nnctry*(&n)); ctry&k = &ctry//P[&k,&m1:&m2]; %let ctry = ctry&k; %end; %end; %mend; /* Macro to show cumulative impulse responses after 4 quarters */ %macro cumirf(nnctry); %let irf = ctry1[1,1:&nnctry]+ctry1[2,1:&nnctry]+ctry1[3,1:&nnctry]+ctry1[4,1:&nnctry]; %do n = 2 %to &nnctry; %let irf1 = ctry&n[1,1:&nnctry]+ctry&n[2,1:&nnctry]+ctry&n[3,1:&nnctry]+ctry&n[4,1:&nnctry]; irfcum = &irf//&irf1; %let irf = irfcum; %end; %mend; data est; set est1.est1; a5=-a5; b5=-b5; c5=-c5; d5=-d5; e5=-e5; f5=-f5; g5=-g5; z1=1; run; proc iml; reset noname; use est; read all; r0_1= z1||a5||a5||a5||a5||a5||a5; r0_2= b5||z1||b5||b5||b5||b5||b5; r0_3= c5||c5||z1||c5||c5||c5||c5; r0_4= d5||d5||d5||z1||d5||d5||d5; r0_5= e5||e5||e5||e5||z1||e5||e5; r0_6= f5||f5||f5||f5||f5||z1||f5; r0_7= g5||g5||g5||g5||g5||g5||z1; BB0=r0_1//r0_2//r0_3//r0_4//r0_5//r0_6//r0_7; r1_1= a1||a6||a6||a6||a6||a6||a6; r1_2= b6||b1||b6||b6||b6||b6||b6; r1_3= c6||c6||c1||c6||c6||c6||c6; r1_4= d6||d6||d6||d1||d6||d6||d6; r1_5= e6||e6||e6||e6||e1||e6||e6; r1_6= f6||f6||f6||f6||f6||f1||f6; r1_7= g6||g6||g6||g6||g6||g6||g1; BB1=r1_1//r1_2//r1_3//r1_4//r1_5//r1_6//r1_7; C=a0//b0//c0//d0//e0//f0//g0; /*Weighting matrix*/ use dd1; read all; W1=W1_1||W1_2||W1_3||W1_4||W1_5||W1_6||W1_7; W2=W2_1||W2_2||W2_3||W2_4||W2_5||W2_6||W2_7; W3=W3_1||W3_2||W3_3||W3_4||W3_5||W3_6||W3_7; W4=W4_1||W4_2||W4_3||W4_4||W4_5||W4_6||W4_7; W5=W5_1||W5_2||W5_3||W5_4||W5_5||W5_6||W5_7; W6=W6_1||W6_2||W6_3||W6_4||W6_5||W6_6||W6_7; W7=W7_1||W7_2||W7_3||W7_4||W7_5||W7_6||W7_7; W=W1//W2//W3//W4//W5//W6//W7; BW0=BB0#W; BW1=-BB1#W; invBW0=inv(BW0); A0=invBW0*C; A1=-invBW0*BW1; I7=I(7); CC={SA,US,CHINA,INDIA,JAPAN,BRAZIL,EU}; AR = BW0||BW1; MA = I7; P = ratio(ar, ma, 20, 7); %impulse(7,20); %cumirf(7); /*Generate output to excel file*/ ods tagsets.excelxp file=c1 style=minimal; print 'Weighting matrix',W[colname=cc format=5.5]; print 'SA impulse responses',ctry1[colname=cc format=5.3]; print 'US impulse responses',ctry2[colname=cc format=5.3]; print 'China impulse responses',ctry3[colname=cc format=5.3]; print 'India impulse responses',ctry4[colname=cc format=5.3]; print 'Japan impulse responses',ctry5[colname=cc format=5.3]; print 'Brazil impulse responses',ctry6[colname=cc format=5.3]; print 'Cumulative impulse responses after 4 quarters', irfcum[colname=cc format=5.3]; ods tagsets.excelxp close;
... View more