___ ____ ____ ____ ____ tm /__ / ____/ / ____/ ___/ / /___/ / /___/ 9.0 Copyright 1984-2005 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, Ph.D. 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 gauss3.do . /* NIST/ITL StRD > Dataset Name: Gauss3 (Gauss3.dat) > > File Format: ASCII > Starting Values (lines 41 to 48) > Certified Values (lines 41 to 53) > Data (lines 61 to 310) > > Procedure: Nonlinear Least Squares Regression > > Description: The data are two strongly-blended Gaussians on a > decaying exponential baseline plus normally > distributed zero-mean noise with variance = 6.25. > > Reference: Rust, B., NIST (1996). > > > > > > > > > > Data: 1 Response (y) > 1 Predictor (x) > 250 Observations > Average Level of Difficulty > Generated Data > > Model: Exponential Class > 8 Parameters (b1 to b8) > > y = b1*exp( -b2*x ) + b3*exp( -(x-b4)**2 / b5**2 ) > + b6*exp( -(x-b7)**2 / b8**2 ) + e > > > Starting values Certified Values > > Start 1 Start 2 Parameter Standard Deviation > b1 = 94.9 96.0 9.8940368970E+01 5.3005192833E-01 > b2 = 0.009 0.0096 1.0945879335E-02 1.2554058911E-04 > b3 = 90.1 80.0 1.0069553078E+02 8.1256587317E-01 > b4 = 113.0 110.0 1.1163619459E+02 3.5317859757E-01 > b5 = 20.0 25.0 2.3300500029E+01 3.6584783023E-01 > b6 = 73.8 74.0 7.3705031418E+01 1.2091239082E+00 > b7 = 140.0 139.0 1.4776164251E+02 4.0488183351E-01 > b8 = 20.0 25.0 1.9668221230E+01 3.7806634336E-01 > > Residual Sum of Squares: 1.2444846360E+03 > Residual Standard Deviation: 2.2677077625E+00 > Degrees of Freedom: 242 > Number of Observations: 250 > */ . . clear . . scalar N = 250 . scalar df_r = 242 . scalar df_m = 8 . . scalar rss = 1.2444846360E+03 . scalar rmse = 2.2677077625E+00 . . scalar b1 = 9.8940368970E+01 . scalar seb1 = 5.3005192833E-01 . scalar b2 = 1.0945879335E-02 . scalar seb2 = 1.2554058911E-04 . scalar b3 = 1.0069553078E+02 . scalar seb3 = 8.1256587317E-01 . scalar b4 = 1.1163619459E+02 . scalar seb4 = 3.5317859757E-01 . scalar b5 = 2.3300500029E+01 . scalar seb5 = 3.6584783023E-01 . scalar b6 = 7.3705031418E+01 . scalar seb6 = 1.2091239082E+00 . scalar b7 = 1.4776164251E+02 . scalar seb7 = 4.0488183351E-01 . scalar b8 = 1.9668221230E+01 . scalar seb8 = 3.7806634336E-01 . . qui input double(y x) . . #delimit ; delimiter now ; . nl ( y = {b1}*exp( -{b2}*x ) + {b3}*exp( -(x-{b4})^2 / {b5}^2 ) > + {b6}*exp( -(x-{b7})^2 / {b8}^2 ) ) , > init(b1 94.9 b2 0.009 b3 90.1 b4 113.0 b5 20.0 b6 73.8 b7 140.0 b8 20 > ) > eps(1e-10); (obs = 250) Iteration 0: residual SS = 18905.14 Iteration 1: residual SS = 4278.011 Iteration 2: residual SS = 1476.725 Iteration 3: residual SS = 1245.232 Iteration 4: residual SS = 1244.485 Iteration 5: residual SS = 1244.485 Iteration 6: residual SS = 1244.485 Iteration 7: residual SS = 1244.485 Iteration 8: residual SS = 1244.485 Source | SS df MS Number of obs = 250 -------------+------------------------------ F( 8, 242) = 31991.00 Model | 1316109.25 8 164513.657 Prob > F = 0.0000 Residual | 1244.48464 242 5.1424985 R-squared = 0.9991 -------------+------------------------------ Adj R-squared = 0.9990 Total | 1317353.74 250 5269.41496 Root MSE = 2.267708 Res. dev. = 1110.723 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- b1 | 98.94037 .530052 186.66 0.000 97.89626 99.98447 b2 | .0109459 .0001255 87.19 0.000 .0106986 .0111932 b3 | 100.6955 .8125678 123.92 0.000 99.09492 102.2961 b4 | 111.6362 .3531785 316.09 0.000 110.9405 112.3319 b5 | 23.3005 .3658472 63.69 0.000 22.57985 24.02115 b6 | 73.70503 1.20912 60.96 0.000 71.32329 76.08677 b7 | 147.7616 .4048817 364.95 0.000 146.9641 148.5592 b8 | 19.66822 .3780672 52.02 0.000 18.9235 20.41294 ------------------------------------------------------------------------------ (SEs, P values, CIs, and correlations are asymptotic approximations) . #delimit cr delimiter now cr . . assert N == e(N) . assert df_r == e(df_r) . assert df_m == e(df_m) . . lrecomp _b[b1] b1 _b[b2] b2 _b[b3] b3 /* > */ _b[b4] b4 _b[b5] b5 _b[b6] b6 _b[b7] b7 /* > */ _b[b8] b8 () /* > */ _se[b1] seb1 _se[b2] seb2 _se[b3] seb3 /* > */ _se[b4] seb4 _se[b5] seb5 _se[b6] seb6 _se[b7] seb7 /* > */ _se[b8] seb8 () /* > */ e(rmse) rmse e(rss) rss _b[b1] 10.1 _b[b2] 9.1 _b[b3] 9.0 _b[b4] 9.0 _b[b5] 8.2 _b[b6] 8.3 _b[b7] 9.1 _b[b8] 8.4 ------------------------- min 8.2 _se[b1] 6.9 _se[b2] 6.3 _se[b3] 5.6 _se[b4] 6.6 _se[b5] 5.8 _se[b6] 5.5 _se[b7] 6.5 _se[b8] 5.6 ------------------------- min 5.5 e(rmse) 10.8 e(rss) 11.0 . . end of do-file