************************************************************************** * Estimation of a CES production function by the Gauss-Newton algorithm * Section 12.2.3b of Judge, Hill et al. [1988, p.514-5] ************************************************************************** SAMPLE 1 30 READ L K Q 0.228 0.802 0.256918 0.258 0.249 0.183599 0.821 0.771 1.212883 0.767 0.511 0.522568 0.495 0.758 0.847894 0.487 0.425 0.763379 0.678 0.452 0.623130 0.748 0.817 1.031485 0.727 0.845 0.569498 0.695 0.958 0.882497 0.458 0.084 0.108827 0.981 0.021 0.026437 0.002 0.295 0.003750 0.429 0.277 0.461626 0.231 0.546 0.268474 0.664 0.129 0.186747 0.631 0.017 0.020671 0.059 0.906 0.100159 0.811 0.223 0.252334 0.758 0.145 0.103312 0.050 0.161 0.078945 0.823 0.006 0.005799 0.483 0.836 0.723250 0.682 0.521 0.776468 0.116 0.930 0.216536 0.440 0.495 0.541182 0.456 0.185 0.316320 0.342 0.092 0.123811 0.358 0.485 0.386354 0.162 0.934 0.279431 * Number of coefficients to estimate NCOEF: 4 * Starting values * The parameters must be named B1, B2, .... GEN1 B1=0.5 GEN1 B2=0.5 GEN1 B3=-1 GEN1 B4=-1 * Maximum number of iterations NITER: 50 * Convergence criteria - the algorithm stops when the * gradient sum of squares is less than the value specified. DELTA: .0001 * Equation specification - A CES production function * The left-hand side of the equation Y: LOG(Q) * The right-hand side of the equation EQRHS: (B1 + B4 * LOG ( B2*L**B3 + (1-B2)*K**B3)) * Estimation by the Gauss-Newton algorithm FILE PROC gauss.prc EXEC GAUSS * ---------------------------------------------------------------------- * Now try the NL command to do the estimation by a different algorithm * Use the same starting values as above - model does not converge GENR LNQ=LOG(Q) NL 1 / NCOEF=4 EQ LNQ=C1 + C4 * LOG ( C2*L**C3 + (1-C2)*K**C3) COEF C1 0.5 C2 .5 C3 -1 C4 -1 END * Now try different starting values NL 1 / NCOEF=4 EQ LNQ=C1 + C4 * LOG ( C2*L**C3 + (1-C2)*K**C3) COEF C1 0.5 C2 .3 C3 -3 C4 -1 END STOP