___ ____ ____ ____ ____ tm /__ / ____/ / ____/ ___/ / /___/ / /___/ 10.0 Copyright 1984-2007 Statistics/Data Analysis StataCorp 4905 Lakeway Drive College Station, Texas 77845 USA 800-STATA-PC http://www.stata.com 979-696-4600 stata@stata.com 979-696-4601 (fax) 3-user Stata for Linux64 (network) perpetual license: Serial number: 999 Licensed to: Brian P. Poi, PhD StataCorp LP Notes: 1. (-m# option or -set memory-) 1.00 MB allocated to data 2. Command line editing disabled 3. Stata running in batch mode running /home/bpp/bin/profile.do ... . do nelson.do . /* NIST StRD benchmark from http://www.nist.gov/itl/div898/strd/ > > Nonlinear Regression > > Difficulty=Average Exponential k=3 N=128 Observed > > Dataset Name: Nelson (Nelson.dat) > > Procedure: Nonlinear Least Squares Regression > > Description: These data are the result of a study involving > the analysis of performance degradation data from > accelerated tests, published in IEEE Transactions > on Reliability. The response variable is dialectric > breakdown strength in kilo-volts, and the predictor > variables are time in weeks and temperature in degrees > Celcius. > > Reference: Nelson, W. (1981). > Analysis of Performance-Degradation Data. > IEEE Transactions on Reliability. > Vol. 2, R-30, No. 2, pp. 149-155. > > Data: 1 Response ( y = dialectric breakdown strength) > 2 Predictors (x1 = time; x2 = temperature) > 128 Observations > Average Level of Difficulty > Observed Data > > Model: Exponential Class > 3 Parameters (b1 to b3) > > log[y] = b1 - b2*x1 * exp[-b3*x2] + e > > > > Starting values Certified Values > > Start 1 Start 2 Parameter Standard Deviation > b1 = 2 2.5 2.5906836021E+00 1.9149996413E-02 > b2 = 0.0001 0.000000005 5.6177717026E-09 6.1124096540E-09 > b3 = -0.01 -0.05 -5.7701013174E-02 3.9572366543E-03 > > Residual Sum of Squares: 3.7976833176E+00 > Residual Standard Deviation: 1.7430280130E-01 > Degrees of Freedom: 125 > Number of Observations: 128 > */ . . clear . . scalar N = 128 . scalar df_r = 125 . scalar df_m = 3 . . scalar rss = 3.7976833176E+00 . scalar rmse = 1.7430280130E-01 . . scalar b1 = 2.5906836021E+00 . scalar seb1 = 1.9149996413E-02 . scalar b2 = 5.6177717026E-09 . scalar seb2 = 6.1124096540E-09 . scalar b3 = -5.7701013174E-02 . scalar seb3 = 3.9572366543E-03 . . qui input double (y x1 x2) . . gen double lny = ln(y) . . nl ( lny = {b1} - {b2}*x1 * exp(-{b3}*x2) ), /// > init(b1 2 b2 0.0001 b3 -0.01) eps(1e-10) (obs = 128) Iteration 0: residual SS = 62.80954 Iteration 1: residual SS = 62.57996 Iteration 2: residual SS = 62.4171 Iteration 3: residual SS = 62.355 Iteration 4: residual SS = 62.22844 Iteration 5: residual SS = 62.10732 Iteration 6: residual SS = 61.99023 Iteration 7: residual SS = 61.87544 Iteration 8: residual SS = 61.76094 Iteration 9: residual SS = 61.64461 Iteration 10: residual SS = 61.52438 Iteration 11: residual SS = 61.39844 Iteration 12: residual SS = 61.26537 Iteration 13: residual SS = 61.26319 Iteration 14: residual SS = 61.25419 Iteration 15: residual SS = 61.2042 Iteration 16: residual SS = 61.06731 Iteration 17: residual SS = 60.8119 Iteration 18: residual SS = 60.52175 Iteration 19: residual SS = 59.37156 Iteration 20: residual SS = 36.09576 Iteration 21: residual SS = 23.79713 Iteration 22: residual SS = 4.236317 Iteration 23: residual SS = 3.798652 Iteration 24: residual SS = 3.797683 Iteration 25: residual SS = 3.797683 Iteration 26: residual SS = 3.797683 Iteration 27: residual SS = 3.797683 Iteration 28: residual SS = 3.797683 Source | SS df MS -------------+------------------------------ Number of obs = 128 Model | 50.6149476 2 25.3074738 R-squared = 0.9302 Residual | 3.79768332 125 .030381467 Adj R-squared = 0.9291 -------------+------------------------------ Root MSE = .1743028 Total | 54.4126309 127 .428445913 Res. dev. = -87.00953 ------------------------------------------------------------------------------ lny | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- /b1 | 2.590684 .01915 135.28 0.000 2.552783 2.628584 /b2 | 5.62e-09 6.11e-09 0.92 0.360 -6.48e-09 1.77e-08 /b3 | -.057701 .0039573 -14.58 0.000 -.0655329 -.0498691 ------------------------------------------------------------------------------ Parameter b1 taken as constant term in model & ANOVA table . . assert N == e(N) . cap noi assert df_r == e(df_r) . cap noi assert df_m == e(df_m) assertion is false . . lrecomp [b1]_b[_cons] b1 [b2]_b[_cons] b2 [b3]_b[_cons] b3 () /* > */ [b1]_se[_cons] seb1 [b2]_se[_cons] seb2 [b3]_se[_cons] seb3 () /* > */ e(rmse) rmse e(rss) rss [b1]_b[_cons] 9.6 [b2]_b[_cons] 7.1 [b3]_b[_cons] 8.3 ------------------------- min 7.1 [b1]_se[_cons] 7.6 [b2]_se[_cons] 5.5 [b3]_se[_cons] 5.2 ------------------------- min 5.2 e(rmse) 11.7 e(rss) 10.9 . end of do-file