** Chapter 10.4 ** for W.H. Greene, Econometric Analysis 6th ed. ***************** * (c) Noel Roy 2003, 2008 * * SYSTEMS OF REGRESSION EQUATIONS * 10.4 SYSTEMS OF DEMAND EQUATIONS: SINGULAR SYSTEMS * * This tutorial will review the following tasks in SHAZAM: * • Estimating systems of equations with cross-equation correlation (SYSTEM command) * • Estimating systems of equations with cross-equation parameter constraints (SYSTEM /RESTRICT) * • Estimating singular equation systems * *=============================================================================== * 10.4.2 Flexible Functional Forms: the Translog Cost Function * * Example 10.8 (p. 278) A Cost Function for U.S. Manufacturing * TIME 1947 1 SAMPLE 1947.0 1971.0 READ (TableF10-2.prn) YEAR COST SK SL SE SM PK PL PE PM / SKIPLINES=1 * * Transform the variables in accordance with the equation system on p. 279. * Note that in order to manipulate constant terms using the * TEST command, the constant terms must be explicitly created. * GENR CONSTANT=1 GENR LNPKPM=LOG(PK/PM) GENR LNPLPM=LOG(PL/PM) GENR LNPEPM=LOG(PE/PM) * * A set of seemingly unrelated regression equations can be estimated with the * general command format: * SYSTEM neq / options * OLS depvar indeps * . . . * OLS depvar indeps * where neq is the number of equations and options is a list of desired options. * After the SYSTEM command there must be one OLS command for each equation in the * system. Options must not be specified on the OLS commands. * * This seemingly unrelated regression imposes cross-equation parameter * restrictions on the estimates. Linear parameter restrictions can be * imposed with the general command format: * SYSTEM neq / RESTRICT options * OLS depvar indeps * . . . * OLS depvar indeps * RESTRICT equation * . . . * RESTRICT equation * END * The RESTRICT commands are specified as linear functions of the variables in the system. * The variable names represent the coefficients. When a variable appears in more than * one equation, the restriction must specify the equation in which the coefficient * involved in the test appears, in the form varname:eqno (e.g., LNPEPM:1 is the * coefficient for LNPEPM in the first equation of the system). * (When a variable appears in only one equation, the equation number can be * omitted without ambiguity). * * Because the constant term is created explicitly, the NOCONSTANT option * must be specified. * * The SYSTEM command is discussed further in chapter 29 of the SHAZAM Manual. * SYSTEM 3 / RESTRICT DN NOCONSTANT PREDICT=SHAT COEF=BETA OLS SK LNPKPM LNPLPM LNPEPM CONSTANT OLS SL LNPKPM LNPLPM LNPEPM CONSTANT OLS SE LNPKPM LNPLPM LNPEPM CONSTANT RESTRICT LNPEPM:1=LNPKPM:3 RESTRICT LNPLPM:1=LNPKPM:2 RESTRICT LNPEPM:2=LNPLPM:3 END * * Because of the restrictions (10-38), the equation system is singular, * and one of the equations (here, the Sm equation) must be excluded. * We can still obtain parameter estimates and associated standard * errors for this equation through the restrictions (10-38) and * the TEST command. * * BETAM: TEST 1-(CONSTANT:1+CONSTANT:2+CONSTANT:3) * * DELTAKM: TEST -(LNPKPM:1+LNPLPM:1+LNPEPM:1) * * DELTALM: TEST -(LNPKPM:2+LNPLPM:2+LNPEPM:2) * * DELTAEM: TEST -(LNPKPM:3+LNPLPM:3+LNPEPM:3) * * DELTAMM: TEST -(LNPKPM:1+LNPLPM:1+LNPEPM:1+LNPKPM:2+LNPLPM:2+LNPEPM:2+LNPKPM:3+LNPLPM:3+LNPEPM:3) * * Now replicate the information in Table 10.5 * * Print cost shares for 1959 as in Table 10.5. * * The predicted values in the system have been saved in the Tx3 matrix SHAT through the * PREDICT= option. * Extract the 13th (for 1959) element of SHAT in each column. MATRIX SKHAT=SHAT(13,1) MATRIX SLHAT=SHAT(13,2) MATRIX SEHAT=SHAT(13,3) * Use the restriction to obtain SMHAT. MATRIX SMHAT=1-SKHAT-SLHAT-SEHAT * * Print the fitted share for each of the factor inputs. * PRINT SKHAT SLHAT SEHAT SMHAT * * Print the actual share for 1959. * SAMPLE 1959.0 1959.0 PRINT SK SL SE SM * * Calculate the implied elasticities of substitutions per equation (10-39). * The regression coefficients have been saved (through the COEF= option) * in the vector BETA in the order in which they are reported in the SYSTEM command. * GENR THETAKK=(BETA(1)+SKHAT*(SKHAT-1))/SKHAT**2 GENR THETAKL=(BETA(2)+SKHAT*SLHAT)/(SKHAT*SLHAT) GENR THETAKE=(BETA(3)+SKHAT*SEHAT)/(SKHAT*SEHAT) GENR THETAKM=(-BETA(1)-BETA(2)-BETA(3)+SKHAT*SMHAT)/(SKHAT*SMHAT) GENR THETALL=(BETA(6)+SLHAT*(SLHAT-1))/SLHAT**2 GENR THETALE=(BETA(7)+SLHAT*SEHAT)/(SLHAT*SEHAT) GENR THETALM=(-BETA(5)-BETA(6)-BETA(7)+SLHAT*SMHAT)/(SLHAT*SMHAT) GENR THETAEE=(BETA(11)+SEHAT*(SEHAT-1))/SEHAT**2 GENR THETAEM=(-BETA(9)-BETA(10)-BETA(11)+SLHAT*SMHAT)/(SLHAT*SMHAT) GENR THETAMM=(BETA(1)+BETA(2)+BETA(3)+BETA(5)+BETA(6)+BETA(7) & +BETA(9)+BETA(10)+BETA(11)+SMHAT*(SMHAT-1))/SMHAT**2 PRINT THETAKK THETAKL THETAKE THETAKM THETALL THETALE THETALM THETAEE & THETAEM THETAMM * * Calculate the implied own-price elasticities as in Table 10.5. * GENR ETAK=SKHAT*THETAKK GENR ETAL=SLHAT*THETALL GENR ETAE=SEHAT*THETAEE GENR ETAM=SMHAT*THETAMM PRINT ETAK ETAL ETAE ETAM * STOP * *=============================================================================== * Updated September 23, 2008.