** Chapter 6.3 ** for W.H. Greene, Econometric Analysis 6th ed. ***************** * (c) Noel Roy 2003, 2008 * * NONLINEARITY IN THE VARIABLES * 6.3.2 Identifying Nonlinearity * * The tutorial for this chapter will review the following tasks in SHAZAM: * • Restricted Least Squares (RESTRICT command) * • Use of index variables in DO commands * • Storing coefficient estimates * • Testing hypotheses (TEST command) * *=============================================================================== * * Exercise 6.3 (p. 114) Functional Form for a Nonlinear Cost Function * * Estimation of Cobb-Douglas cost function for U.S. electric utility industry. * SAMPLE 1 145 READ (TableF10-1.txt) Firm Year Costs KWH PL SL PK SK PF SF /SKIPLINES=2 * * Perform data transformations * GENR LNCOSTS=LOG(COSTS) GENR LNKWH=LOG(KWH) GENR LNPL=LOG(PL) GENR LNPF=LOG(PF) GENR LNPK=LOG(PK) * * Estimate the function subject to restrictions * OLS LNCOSTS LNKWH LNPL LNPF LNPK / LOGLOG RESTRICT COEF=BETA RESID=ERR RESTRICT LNPL+LNPF+LNPK=1 END * * Test hypotheses on returns to scale and price terms * CONFID LNKWH TEST LNKWH=1 * Compute asymptotic significance test for alpha2 = beta2/betay TEST LNPK/LNKWH * Compute returns to scale parameter 1/betay GEN1 1/BETA(1) * * Plot residuals * GRAPH ERR LNKWH /NOKEY * * Repeat estimation for each of 5 groups of 29 firms (the data are * presorted by output). Noes that the SAMPLE command can take * variables as arguments). * SET DOECHO DO #=1,5 GEN1 BEG=(#-1)*29+1 GEN1 END=#*29 SAMPLE BEG END OLS LNCOSTS LNKWH LNPL LNPF LNPK / LOGLOG RESTRICT COEF=BETA# RESTRICT LNPL+LNPF+LNPK=1 END * Compute returns to scale parameters GEN1 1/BETA#(1) ENDO * * Introduce quadratic term * SAMPLE 1 145 GENR LNYSQ=LNKWH**2 OLS LNCOSTS LNKWH LNYSQ LNPL LNPF LNPK / LOGLOG RESTRICT COEF=BETA RESTRICT LNPL+LNPF+LNPK=1 END * * The estimate for the quadratic term is quite different from * that reported by Nerlove, but the qualitative results are * similar. * * Test for constant returns to scale TEST TEST LNKWH=1 TEST LNYSQ=0 END * *Calculate returns to scale parameter for the median firm * in each subsample DO #=1,5 GEN1 1/(BETA(1)+2*BETA(2)*LNKWH(15+29*(#-1))) ENDO * STOP * *=============================================================================== * * Updated September 2, 2008