** Chapter 13.9 ** for W.H. Greene, Econometric Analysis 6th ed. ***************** * (c) Noel Roy 2003, 2008 * * SIMULTANEOUS-EQUATIONS MODELS * PROPERTIES OF DYNAMIC MODELS * * This tutorial for this chapter will review the following tasks in SHAZAM * using the MATRIX command: * • Solving for the reduced form of the system * • Generating dynamic responses to policy changes * *=============================================================================== * Example 13.8 Dynamic model * * Read Klein's data. * TIME 1920 1 SAMPLE 1920.0 1941.0 READ (TableF13-1.prn) / NAMES * First generate the necessary variables. * GENR PLAG=LAG(P) GENR XLAG=LAG(X) GENR W=WP+WG GENR A=YEAR-1931 SAMPLE 1921.0 1941.0 * * Set up the Gamma, Beta, and Phi matrices in Table 13.5. * We will include the zero rows in Phi that are omitted from * the table. * * Specify the dimensions of the Gamma, Beta, and Phi matrices. DIM GAMMA 6 6 BETA 5 6 PHI 6 6 * * Estimate and store the 2SLS coefficients ?2SLS C P PLAG W (WG G T PLAG K1 XLAG A) /COEF=DELTAC ?2SLS I P PLAG K1 (WG G T PLAG K1 XLAG A) /COEF=DELTAI ?2SLS WP X XLAG A (WG G T PLAG K1 XLAG A) /COEF=DELTAWP * * Insert the 2SLS coefficients into the appropriate matrix. MATRIX GAMMA(5,1)=-DELTAC(1) MATRIX PHI(5,1)=-DELTAC(2) MATRIX GAMMA(3,1)=-DELTAC(3) MATRIX BETA(2,1)=-DELTAC(3) MATRIX BETA(1,1)=-DELTAC(4) MATRIX GAMMA(5,2)=-DELTAI(1) MATRIX PHI(5,2)=-DELTAI(2) MATRIX PHI(6,2)=-DELTAI(3) MATRIX BETA(1,2)=-DELTAI(4) MATRIX GAMMA(4,3)=-DELTAWP(1) MATRIX PHI(4,3)=-DELTAWP(2) MATRIX BETA(5,3)=-DELTAWP(3) MATRIX BETA(1,3)=-DELTAWP(4) MATRIX GAMMA(1,4)=-1 MATRIX GAMMA(2,4)=-1 MATRIX GAMMA(2,6)=-1 MATRIX GAMMA(4,5)=-1 MATRIX BETA(4,4)=-1 MATRIX PHI(6,6)=-1 MATRIX GAMMA(3,5)=1 MATRIX BETA(3,5)=1 DO #=1,6 MATRIX GAMMA(#,#)=1 ENDO SET WIDE PRINT GAMMA BETA PHI * * Create the Pi and Delta matrices as per Section 13.9.1. MATRIX GAMMAINV=INV(GAMMA) MATRIX PI=-BETA*GAMMAINV MATRIX DELTA=-PHI*GAMMAINV PRINT PI DELTA * * Extract the "stability" part of Delta (Delta 1), as in Section 13.9.2. MATRIX DELTA1=DELTA(4;6,4;6) PRINT DELTA1 * Generate the characteristic roots of Delta1. MATRIX ROOTS=EIGVAL(DELTA1) PRINT ROOTS * If there are complex roots (so that roots has two columns, one for the * real part and one for the imaginary part), calculate the moduli of the * roots. GEN1 NROOTS=$ROWS GEN1 COMPLEX=$COLS-1 IF (COMPLEX.EQ.1) MATRIX MODULI=SQRT(ROOTS(0,1)**2+ROOTS(0,2)**2) IF (COMPLEX.EQ.0) MATRIX MODULI=SQRT(ROOTS**2) PRINT MODULI * If the system is stable, calculate the equilibrium multipliers (p. 390). IF (MODULI.LT.1) MATRIX MULT=PI*INV(IDEN(6)-DELTA) PRINT MULT * * Calculate the period of any oscillatory roots. * MATRIX A=ROOTS(0,1)/MODULI SAMPLE 1 NROOTS GENR PERIOD=2*$PI/($PI/2-SIN(A,-1)) * Real roots will have A=1, so the arcsin will be close to Pi/2, * making PERIOD very large. PRINT PERIOD * * Calculate impulse response functions for taxes and spending on output, * over 20 time pariods past the impulse effect. DIM TAXES 21 SPENDING 21 MATRIX DYNMULT=PI SET NODOECHO DO #=1,21 MATRIX TAXES(#)=DYNMULT(3,4) MATRIX SPENDING(#)=DYNMULT(4,4) MATRIX DYNMULT=DYNMULT*DELTA ENDO * Graph Figure 13.2 GRAPH TAXES SPENDING /TIME LINE BEG=1 END=21 STOP * *=============================================================================== * Updated October 22, 2008