options crt; ? 10e9 in klein; freq a; smpl 20,41; w = w1+w2; y = cn+i+g-tx; title 'Exercise 9, part (a) - Jacobian of Klein-I'; ? Jacobian for Klein-I is the matrix: (see Exercise 8) ? 1-a2 a2 a2-a1 ? -b1 1-b1 b1 ? -g1 -g1 1 ? Note: the diagonal terms are not unity, as stated in Berndt p.576. ? We can compute the determinant of J by taking the top row, and multiplying ? each element by its cofactor. (The cofactor is the determinant of the ? submatrix where the row and column corresponding to the particular ? element are removed). For example, for the (1,1) element, the cofactor ? is the determinant of 1-b1 b1 = (1-b1)*1 - (-g1)*b1 = 1-b1+g1*b1 . ? -g1 1 ? (There is also the matter of signs of the cofactors) ? So we can write the determinant of J as: ? detj = (1-a2)*[1-b1+g1*b1] + a2*[b1-b1*g1] + (a2-a1)*[g1] ? This simplifies to the expression below. frml detj g1*(a2-a1+b1) + 1-a2-b1; print detj; title 'Exercise 9, part (b) - Jacobian of recursive Klein(1953)'; ? ? KLEIN 1953 model (recursive) ? FRML CON CN = A0 + A1*Y + A2*Y(-1); FRML INV I = B0 + B1*P(-1) + B2*KLAG; FRML WAGES W1 = G0 + G1*E + G2*E(-1); PARAM A0-A2 B0-B2 G0-G2; SMPL 21,41 ; ? ? To form the Jacobian, subsitute in the Y identity and move the ? terms with the variables I CN W1 to the LHS: ?FRML INV I = B0 + B1*P(-1) + B2*KLAG; ?FRML CON CN -A1*(CN + I + G - TX) = A0 + A2*Y(-1); ?FRML WAGES W1 -G1*(CN + I + G - TX + TX - W2) = G0 + G2*E(-1); ? The Jacobian (in order I CN W1) is: ? I CN W1 ? --- ---- -- ? 1 0 0 ? -A1 1-A1 0 ? -G1 -G1 1 ? This is triangular. The determinant is (1-A1) (not unity). frml detj 1-a1; print detj; title 'Exercise 9, part (c) - estimation with staged OLS'; olsq i c p(-1) klag; ? (10.63), not (10.62) ifit = @fit; jfit = ifit - tx + g; olsq y c y(-1) jfit; ? (10.75), transformed version of (10.62) yfit = @fit; efit = yfit + tx - w2; olsq w1 c efit e(-1); ? (10.64) title 'Exercise 9, part (e) - FIML estimation'; IDENT TPROD Y = CN + I + G - TX; ? most useful normalization IDENT PPROD E = Y + TX - W2; fiml(endog=(CN,I,W1,Y,E)) CON INV WAGES TPROD PPROD; title 'Exercise 9, part (f) - IZEF estimation of structural form'; LSQ CON INV WAGES; title 'Exercise 9, part (f.2) - IZEF estimation of recursive form'; title '(same as FIML - det(Jacobian) = 1)'; ? (10.75), transformed version of (10.62) to obtain a ? unit triangular Jacobian (determinant of 1) J = I - TX + G; frml eq1075 y = (A0 + a2*y(-1) + J)/(1-A1); LSQ INV eq1075 WAGES;