* Chapter 15.6 - The Translog Cost Function * W.H. Greene, Econometric Analysis, Fourth Edition, 2000. * Example 15.18 - A Cost Function for U.S. Manufacturing, pp. 643-644. SAMPLE 1 25 * Load the Berndt and Wood data set (Table A15.3). READ (cost4.shd) / NAMES GENR SHAREK=K GENR SHAREL=L GENR SHAREE=E GENR SHAREM=M * Generate variables for the estimation of the three factor share * system at top of p. 643. GENR LNPKPM=LOG(PK/PM) GENR LNPLPM=LOG(PL/PM) GENR LNPEPM=LOG(PE/PM) * Generate a constant term to be included as a regressor. * This permits hypothesis testing on the equation intercepts. GENR ONE=1 * Estimation as a seemingly unrelated set of equations with * symmetry constraints imposed. * To obtain a non-singular system drop one equation. * Iterative FGLS estimation is used to ensure invariance with * respect to the choice of which share equation is dropped. SYSTEM 3 / RESTRICT NOCONSTANT ITER=50 PREDICT=FITTED OLS SHAREK ONE LNPKPM LNPLPM LNPEPM OLS SHAREL ONE LNPKPM LNPLPM LNPEPM OLS SHAREE ONE LNPKPM LNPLPM LNPEPM RESTRICT LNPLPM:1=LNPKPM:2 RESTRICT LNPEPM:1=LNPKPM:3 RESTRICT LNPEPM:2=LNPLPM:3 END * Obtain estimates of the other parameters using the formula in * Equation (15-71), p. 642. * beta_M TEST 1-ONE:1-ONE:2-ONE:3 * delta_KM TEST -(LNPKPM:1+LNPLPM:1+LNPEPM:1) * delta_LM TEST -(LNPKPM:2+LNPLPM:2+LNPEPM:2) * delta_EM TEST -(LNPKPM:3+LNPLPM:3+LNPEPM:3) * delta_MM TEST LNPKPM:1+LNPLPM:2+LNPEPM:3 + 2*(LNPLPM:1+LNPEPM:1+LNPEPM:2) * Fitted cost shares for 1959 (observation number 13) MATRIX SF1=FITTED(13,1) MATRIX SF2=FITTED(13,2) MATRIX SF3=FITTED(13,3) GEN1 SF4=1-SF1-SF2-SF3 * Actual cost shares for 1959 GEN1 SA1=SHAREK:13 GEN1 SA2=SHAREL:13 GEN1 SA3=SHAREE:13 GEN1 SA4=SHAREM:13 * Print the cost shares for 1959 (see Table 15.12, p. 643). SAMPLE 1 1 FORMAT(14X,'K',11X,'L',11X,'E',11X,'M'/' Fitted',4F12.5/' Actual',4F12.5) PRINT SF1-SF4 SA1-SA4 / FORMAT NONAMES * Alternative estimation method - the NL command can be used to * estimate a system of seemingly unrelated regression equations. SAMPLE 1 25 * The GENRVAR option creates a set of scalar variables for the * coefficient estimates from the estimation. NL 3 / NCOEF=9 GENRVAR EQ SHAREK = b1 + d11*LNPKPM + d12*LNPLPM + d13*LNPEPM EQ SHAREL = b2 + d12*LNPKPM + d22*LNPLPM + d23*LNPEPM EQ SHAREE = b3 + d13*LNPKPM + d23*LNPLPM + d33*LNPEPM END GEN1 d14= -(d11+d12+d13) GEN1 d24= -(d12+d22+d23) GEN1 d34= -(d13+d23+d33) GEN1 d44= d11+d22+d33 + 2*(d12+d13+d23) PRINT d14 d24 d34 d44 * Calculate implied elasticities of substitution for 1959 using * the fitted cost shares (see Equation 15-72, p. 642). DIM S 4 5 SET NODOECHO * Calculate the diagonal terms DO #=1,4 MATRIX S(#,#) = (d## + SF#*(SF#-1)) / (SF#*SF#) MATRIX S(#,5) = SF#*S(#,#) ENDO * Now calculate the off-diagonal terms DO #=2,4 GEN1 I=#-1 DO %=1,I MATRIX S(#,%) = (d%# + SF#*SF%) / (SF#*SF%) MATRIX S(%,#)=S(#,%) ENDO ENDO * Print the results (see Table 15.12, p. 643). MATRIX SV=VEC(S) FORMAT(12X,'K',11X,'L',11X,'E',11X,'M'/' K',4F12.4/' L',4F12.4/ & ' E',4F12.4/' M',4F12.4//' OWN',4F12.4) PRINT SV / FORMAT NONAMES STOP