/********************************************************** Problem 12.1 Impulse response functions ***********************************************************/ new; library pgraph; graphset; let t=10; @number of periods@ let a={0.2 0,1 0.5}; @specification of VAR coefficients@ let e=1 0; @unit vector@ z=zeros(2,t); @initialization@ /* simulation of the system for t periods */ i=1; b=a; DO WHILE i<=t; z[.,i]=b*e; i=i+1; b=b*a; ENDO; /* generation of graphical output*/ /*creating a linear trend*/ tt=zeros(t,1); @initialization@ j=1; DO WHILE j<=t; tt[j]=j; j=j+1; ENDO; begwind; window(2,1,0); setwind(1); _pcolor=3; title("Imp. resp. of y to shock in y"); xy(tt,z[1,.]'); nextwind; _pcolor=5; title("Imp. resp. of x to shock in y"); xy(tt,z[2,.]'); endwind; end;