** Chapter 14.3.3 ** for W.H. Greene, Econometric Analysis 6th ed. ***************** * (c) Noel Roy 2003, 2008 * * * 14.3 SEMIPARAMETRIC ESTIMATION * 14.3.3 Partially Linear Regression * *=============================================================================== * * Example 14.5 (p. 410) Partially Linear Translog Cost Function * SAMPLE 1 158 READ (TableF4-3.prn) /names * Transform the data to the form of the parametric model. GENR c=LOG(Cost/Q/PF) GENR k=LOG(PK/PF) GENR l=LOG(PL/PF) GENR q=LOG(Q) GENR q2=q**2/2 * While it is stated in the text that data from firms 6-123 in the * data set are used in the example, we cannot replicate the results unless * firms 6-140 are used, AFTER the data have been sorted in output order. sort q c k l q2 PF Cost sample 6 140 * Estimate the parametric model. OLS c k l q q2 / LOGLOG * Calculate the partial differences of the variables c, k, and l for M=2 * see top of p. 410).. GENR cd=.809*c-.5*LAG(c)-.309*LAG(c,2) GENR kd=.809*k-.5*LAG(k)-.309*LAG(k,2) GENR ld=.809*l-.5*LAG(l)-.309*LAG(l,2) * Estimate Beta1 and Beta2 for the partial linear model. OLS CD KD LD /NOCONSTANT COEF=B * Calculate the residuals to the model, and extract log(PF) from the residuals. GENR fQ=c-B(1)*k-B(2)*l GENR fQ=fQ+log(pf) * Smooth the effect of output on average cost using kernel extimation. * In general, the format for regression smoothing is: * NONPAR depvar indeps / options * See chapter 23 of the SHAZAM Manual for further information. NONPAR fQ q /PREDICT=fQhat * Graph the relationship using the original (non-log) transformation, * replicating Figure 14.2. genr efq=exp(fq) genr efqhat=exp(fqhat) genr output=exp(q) graph efq efqhat output STOP * *=============================================================================== * Updated October 27, 2008