This note gives an illustration of using EVIEWS to compute NLS estimates of the parameters of a nonlinear learning curve. The TIO2 and NERLOV data from lab 1 and are used in this example. The results given here should be compared to the maximum likelihood results obtained using GAUSS.
Start by creating the real unit cost variable
GENR RUCOST = (UCOSTT/DEFL)*100
Before computing NLS estimates of the parameters c1, ac (learning
curve elasticity) and r you must specify starting values for these
parameters. It is important to give good starting values in the application of
nonlinear least squares. Unfortunately, it is often difficult to know what
good starting values are.
For the generalized learning curve, convenient starting values are those obtained by OLS from the log-linear formulation from Lab 1. These values are: c1 = exp(6.0425) = 420, ac = -0.35 and r = 1.15. To set these starting values in EVIEWS use the PARAM command:
PARAM C(1) 420 C(2) -0.35 C(3) 1.15
EVIEWS automatically computes NLS estimates when the equation specified in the equation box is nonlinear in the parameters. For example, to estimate the nonlinear learning curve select Quick/Estimate Equation and in the equation box type
RUCOST = C(1)*(CUMT^(C(2)/C(3)))*PRODT^((1-C(3))/C(3))
EVIEWS produces the following output
LS // Dependent Variable is RUCOST Date: 04/21/96 Time: 20:45 Sample: 1955 1970 Included observations: 16 Convergence achieved after 7 iterations RUCOST = C(1)*(CUMT^(C(2)/C(3)))*PRODT^((1-C(3))/C(3)) Coefficient Std. Error t-Statistic Prob. C(1) 355.3629 92.16187 3.855856 0.0020 C(2) -0.299685 0.071811 -4.173221 0.0011 C(3) 1.224989 0.206624 5.928589 0.0000 R-squared 0.900289 Mean dependent var 21.93174 Adjusted R-squared 0.884948 S.D. dependent var 3.082034 S.E. of regression 1.045403 Akaike info criterion 0.256166 Sum squared resid 14.20728 Schwarz criterion 0.401026 Log likelihood -21.75234 F-statistic 58.68814 Durbin-Watson stat 0.632589 Prob(F-statistic) 0.000000
You should compare these values and standard errors to the ones you obtained
in lab 1.
To illustrate the importance of using "good" starting values consider what happens if the following starting values are used:
PARAM C(1) 0 C(2) 0 C(3) 0.1
EVIEWS then computes the following
LS // Dependent Variable is RUCOST Date: 04/21/96 Time: 21:06 Sample: 1955 1970 Included observations: 16 Convergence achieved after 1 iterations RUCOST = C(1)*(CUMT^(C(2)/C(3)))*PRODT^((1-C(3))/C(3)) Coefficient Std. Error t-Statistic Prob. C(1) 3.97E-20 2.43E-18 0.016345 0.9872 C(2) -2.23E-32 0.752469 -2.97E-32 1.0000 C(3) 0.100000 0.211334 0.473185 0.6439 R-squared -36.467188 Mean dependent var 21.93174 Adjusted R-squared -42.231370 S.D. dependent var 3.082034 S.E. of regression 20.26455 Akaike info criterion 6.185106 Sum squared resid 5338.475 Schwarz criterion 6.329967 Log likelihood -69.18387 Durbin-Watson stat 0.067611
which does not make a whole lot of sense.
To test hypotheses with NLS, you can use an F-statistic based on the differences in the SSR from the restricted and unrestricted regressions (just as in linear regression).
Now consider estimating the parameters of the Cobb-Doublas cost function, using the Nerlove data, by NLS. First we estimate the cost function without any homogeneity constraints.
LS // Dependent Variable is LNC Date: 04/21/96 Time: 21:17 Sample: 1 145 Included observations: 145 Variable Coefficient Std. Error t-Statistic Prob. C -3.526503 1.774367 -1.987471 0.0488 LNY 0.720394 0.017466 41.24448 0.0000 LNPK -0.219888 0.339429 -0.647819 0.5182 LNPL 0.436341 0.291048 1.499209 0.1361 LNPF 0.426517 0.100369 4.249483 0.0000 R-squared 0.925955 Mean dependent var 1.724663 Adjusted R-squared 0.923840 S.D. dependent var 1.421723 S.E. of regression 0.392356 Akaike info criterion -1.837299 Sum squared resid 21.55201 Schwarz criterion -1.734653 Log likelihood -67.54189 F-statistic 437.6863 Durbin-Watson stat 1.013062 Prob(F-statistic) 0.000000
This regression will give us starting values for NLS estimation. In particular k = exp(-3.52) = 0.30; r = 1/0.72 = 1.38; a1 = 1.38*(-0.22) = -0.30; a2 = 1.38*(0.43) = 0.60; a3 = 1.38*(0.43) = 0.60. Set these values using the PARAM command
PARAM C(1) 0.03 C(2) 1.38 C(3) -0.30 C(4) 0.6 C(5) 0.6
Now estimate the cost function by NLS. Select Quick/Estimate Equation and type the following equation in the equation box COSTS = C(1)*(KWH^(1/C(2)))*(PK^(C(3)/C(2)))*(PL^(C(4)/C(2)))*(PF^(C(5)/ C(2)))
EVIEWS computes the following results (after 96 iterations!)
LS // Dependent Variable is COSTS Date: 04/21/96 Time: 21:34 Sample: 1 145 Included observations: 145 Convergence achieved after 96 iterations COSTS = C(1)*(KWH^(1/C(2)))*(PK^(C(3)/C(2)))*(PL^(C(4)/C(2)))*(PF^(C(5)/ C(2))) Coefficient Std. Error t-Statistic Prob. C(1) 5.40E-05 3.26E-05 1.653102 0.1006 C(2) 0.932777 0.022693 41.10413 0.0000 C(3) 0.376578 0.122812 3.066284 0.0026 C(4) 0.998964 0.170813 5.848288 0.0000 C(5) 0.350542 0.086877 4.034930 0.0001 R-squared 0.963708 Mean dependent var 12.97610 Adjusted R-squared 0.962671 S.D. dependent var 19.79458 S.E. of regression 3.824441 Akaike info criterion 2.716699 Sum squared resid 2047.689 Schwarz criterion 2.819345 Log likelihood -397.7068 F-statistic 929.4039 Durbin-Watson stat 1.559691 Prob(F-statistic) 0.000000
Notice that the elasticities for capital, labor and fuel are all positive and
that returns to scale appear to be about 1. However, the residuals do seem to
indicate the returns to scale do vary with output (but not as much as the log-
linear model indicates).
Next we estimate the cost function imposing the homogeneity constraint. Create the transformed variables
GENR C3 = COSTS/PF GENR P13 = PK/PF GENR P23 = PL/PF
Set the starting values
PARAM C(1) 5.40E-05 C(2) 0.93 C(3) 0.37 C(4) 0.99
and estimate the equation
C3 = C(1)*(KWH^(1/C(2)))*(P13^(C(3)/C(2)))*(P23^(C(4)/C(2)))
EVIEWS gives the output
LS // Dependent Variable is C3 Date: 04/21/96 Time: 21:47 Sample: 1 145 Included observations: 145 Convergence achieved after 8 iterations C3 = C(1)*(KWH^(1/C(2)))*(P13^(C(3)/C(2)))*(P23^(C(4)/C(2))) Coefficient Std. Error t-Statistic Prob. C(1) 0.000701 0.000376 1.864379 0.0643 C(2) 0.933315 0.022219 42.00581 0.0000 C(3) -0.048998 0.090111 -0.543760 0.5875 C(4) 0.597773 0.097889 6.106614 0.0000 R-squared 0.958224 Mean dependent var 0.532489 Adjusted R-squared 0.957335 S.D. dependent var 0.736401 S.E. of regression 0.152107 Akaike info criterion -3.739148 Sum squared resid 3.262239 Schwarz criterion -3.657031 Log likelihood 69.34212 F-statistic 1078.053 Durbin-Watson stat 1.565581 Prob(F-statistic) 0.000000
It is now trivial to compute an F-statistic to test the hypothesis of homogeneity of degree one in inpute prices.