* A logistic growth curve * Reference: Chapter 10.3 of * R. Carter Hill, William E. Griffiths and George G. Judge, * Undergraduate Econometrics, Second Edition, Wiley. SAMPLE 1 28 READ (TAB10-3.shd) YEAR T EAF / LIST * Nonlinear least squares NL 1 / NCOEF=3 EQ EAF = ALPHA/(1+EXP(-BETA-DELTA*T)) * Starting values COEF ALPHA 0.5 BETA -1 DELTA 0.1 END * Hypothesis testing TEST -(BETA/DELTA) = 11 * Note: The SHAZAM output shows that the estimation converges * in 7 iterations. The variance-covariance matrix that is calculated * requires numerical approximation methods. Therefore, the * test statistics calculated for hypothesis testing may have * different numerical values from the values reported in the textbook * that may be based on different approximation methods. * However, the final conclusions should be similar. * Variation A - * the OPGCOV option gives a different calculation method for * the variance-covariance matrix of the parameter estimates. * Therefore, the test statistics for hypothesis testing * will be different. NL 1 / NCOEF=3 OPGCOV EQ EAF = ALPHA/(1+EXP(-BETA-DELTA*T)) COEF ALPHA 0.5 BETA -1 DELTA 0.1 END TEST -(BETA/DELTA) = 11 * Variation B - * the COEF command is used to set different starting values. NL 1 / NCOEF=3 EQ EAF = ALPHA/(1+EXP(-BETA-DELTA*T)) COEF ALPHA 0.5 BETA 0 DELTA 0.5 END TEST -(BETA/DELTA) = 11 * Note: The estimation now converges in 21 iterations (compared * to 7 iterations for the previous estimations). * The gradient at the final iteration appears to have smaller * values than shown for the previous estimation -- an indicator * of successful model convergence. In this case, the higher * number of iterations may also give the algorithm an improved * ability to form an approximation of the variance-covariance * matrix of the parameter estimates. * It can be noted that the t-ratios are similar to the t-ratios * reported previously when the OPGCOV option was used. STOP