___ ____ ____ ____ ____ ® /__ / ____/ / ____/ 18.0 ___/ / /___/ / /___/ SE—Standard Edition Statistics and Data Science Copyright 1985-2023 StataCorp LLC StataCorp 4905 Lakeway Drive College Station, Texas 77845 USA 800-STATA-PC https://www.stata.com 979-696-4600 stata@stata.com Stata license: 10-user network perpetual Serial number: 1 Licensed to: Stata Developer StataCorp LLC Notes: 1. Stata is running in batch mode. 2. Unicode is supported; see help unicode_advice. 3. Maximum number of variables is set to 5,000 but can be increased; see help set_maxvar. Running /home/krg/bin/profile.do ... Compile number 180110 . do nelson.do . /* NIST/ITL 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) 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.614948 2 25.3074738 R-squared = 0.9302 Residual | 3.7976833 125 .030381467 Adj R-squared = 0.9291 -------------+---------------------------------- Root MSE = .1743028 Total | 54.412631 127 .428445913 Res. dev. = -87.00953 ------------------------------------------------------------------------------ lny | Coefficient 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 ------------------------------------------------------------------------------ Note: Parameter b1 is used as a constant term during estimation. . . 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