* * Example from 14.3.1, pp 363-365 * open data nerlove.txt data(format=prn,org=columns) 1 145 firm year cost output wage labor capprice capshare fuelprice fuelshare * set logc = log(cost) set logq = log(output) set logpk = log(capprice) set logpl = log(wage) set logpf = log(fuelprice) set laborshare = labor * * System without quadratic term * For convenience, the formula is written in terms of all the beta's, with a * substitution constraint which imposes the constant returns restriction. * nonlin b0 bq bk bl bf bf=1-bk-bl frml costfnc logc = b0+bq*logq+bk*logpk+bl*logpl+bf*logpf frml laborfnc laborshare = bl frml capfnc capshare = bk nlsystem(title="Univariate (OLS)") / costfnc nlsystem(title="Multivariate") / costfnc laborfnc capfnc * * System with quadratic term * nonlin b0 bq bqq bk bl bf bf=1-bk-bl frml costfnc logc = b0+bq*logq+bqq*logq**2+bk*logpk+bl*logpl+bf*logpf nlsystem(title="Univariate (OLS)") / costfnc nlsystem(title="Multivariate") / costfnc laborfnc capfnc * set actual = 100.0*cost/output set predicted = 100.0*exp(costfnc)/output scatter(footer="Figure 14.3 Predicted and Actual Average Costs",key=upright) 2 # output actual 145/3 * # output predicted 145/3 *