___ ____ ____ ____ ____ 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 lanczos2.do . /* NIST/ITL StRD > Dataset Name: Lanczos2 (Lanczos2.dat) > > File Format: ASCII > Starting Values (lines 41 to 46) > Certified Values (lines 41 to 51) > Data (lines 61 to 84) > > Procedure: Nonlinear Least Squares Regression > > Description: These data are taken from an example discussed in > Lanczos (1956). The data were generated to 6-digits > of accuracy using > f(x) = 0.0951*exp(-x) + 0.8607*exp(-3*x) > + 1.5576*exp(-5*x). > > > Reference: Lanczos, C. (1956). > Applied Analysis. > Englewood Cliffs, NJ: Prentice Hall, pp. 272-280. > > > > > Data: 1 Response (y) > 1 Predictor (x) > 24 Observations > Average Level of Difficulty > Generated Data > > Model: Exponential Class > 6 Parameters (b1 to b6) > > y = b1*exp(-b2*x) + b3*exp(-b4*x) + b5*exp(-b6*x) + e > > > > Starting values Certified Values > > Start 1 Start 2 Parameter Standard Deviation > b1 = 1.2 0.5 9.6251029939E-02 6.6770575477E-04 > b2 = 0.3 0.7 1.0057332849E+00 3.3989646176E-03 > b3 = 5.6 3.6 8.6424689056E-01 1.7185846685E-03 > b4 = 5.5 4.2 3.0078283915E+00 4.1707005856E-03 > b5 = 6.5 4 1.5529016879E+00 2.3744381417E-03 > b6 = 7.6 6.3 5.0028798100E+00 1.3958787284E-03 > > Residual Sum of Squares: 2.2299428125E-11 > Residual Standard Deviation: 1.1130395851E-06 > Degrees of Freedom: 18 > Number of Observations: 24 > */ . . clear . . scalar N = 24 . scalar df_r = 18 . scalar df_m = 6 . . scalar rss = 2.2299428125E-11 . scalar rmse = 1.1130395851E-06 . . . scalar b1 = 9.6251029939E-02 . scalar seb1 = 6.6770575477E-04 . scalar b2 = 1.0057332849E+00 . scalar seb2 = 3.3989646176E-03 . scalar b3 = 8.6424689056E-01 . scalar seb3 = 1.7185846685E-03 . scalar b4 = 3.0078283915E+00 . scalar seb4 = 4.1707005856E-03 . scalar b5 = 1.5529016879E+00 . scalar seb5 = 2.3744381417E-03 . scalar b6 = 5.0028798100E+00 . scalar seb6 = 1.3958787284E-03 . . qui input double(y x) . . nl ( y = {b1}*exp(-{b2}*x) + {b3}*exp(-{b4}*x) + {b5}*exp(-{b6}*x) ), /// > init(b1 1.2 b2 0.3 b3 5.6 b4 5.5 b5 6.5 b6 7.6) eps(1e-10) (obs = 24) Iteration 0: residual SS = 12.09286 Iteration 1: residual SS = .0160618 Iteration 2: residual SS = .0000399 Iteration 3: residual SS = .0000359 Iteration 4: residual SS = .0000315 Iteration 5: residual SS = .0000286 Iteration 6: residual SS = .0000188 Iteration 7: residual SS = 3.03e-06 Iteration 8: residual SS = 3.03e-06 Iteration 9: residual SS = 1.87e-06 Iteration 10: residual SS = 2.87e-11 Iteration 11: residual SS = 2.23e-11 Iteration 12: residual SS = 2.23e-11 Source | SS df MS -------------+------------------------------ Number of obs = 24 Model | 19.2786292 6 3.21310487 R-squared = 1.0000 Residual | 2.2299e-11 18 1.2389e-12 Adj R-squared = 1.0000 -------------+------------------------------ Root MSE = 1.11e-06 Total | 19.2786292 24 .803276217 Res. dev. = -596.7993 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- /b1 | .096251 .0006677 144.15 0.000 .0948482 .0976538 /b2 | 1.005733 .003399 295.89 0.000 .9985923 1.012874 /b3 | .8642469 .0017186 502.88 0.000 .8606363 .8678575 /b4 | 3.007828 .0041707 721.18 0.000 2.999066 3.016591 /b5 | 1.552902 .0023744 654.01 0.000 1.547913 1.55789 /b6 | 5.00288 .0013959 3584.05 0.000 4.999947 5.005812 ------------------------------------------------------------------------------ . . assert N == e(N) . assert df_r == e(df_r) . assert df_m == e(df_m) . . lrecomp [b1]_b[_cons] b1 [b2]_b[_cons] b2 [b3]_b[_cons] b3 /* > */ [b4]_b[_cons] b4 [b5]_b[_cons] b5 [b6]_b[_cons] b6 () /* > */ [b1]_se[_cons] seb1 [b2]_se[_cons] seb2 [b3]_se[_cons] seb3 /* > */ [b4]_se[_cons] seb4 [b5]_se[_cons] seb5 [b6]_se[_cons] seb6 () /* > */ e(rmse) rmse e(rss) rss [b1]_b[_cons] 7.9 [b2]_b[_cons] 8.2 [b3]_b[_cons] 8.5 [b4]_b[_cons] 8.6 [b5]_b[_cons] 8.6 [b6]_b[_cons] 9.3 ------------------------- min 7.9 [b1]_se[_cons] 5.6 [b2]_se[_cons] 5.7 [b3]_se[_cons] 5.6 [b4]_se[_cons] 5.6 [b5]_se[_cons] 5.6 [b6]_se[_cons] 5.4 ------------------------- min 5.4 e(rmse) 10.8 e(rss) 10.1 . . . end of do-file