___ ____ ____ ____ ____ 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 mgh09.do . /* NIST/ITL StRD > Dataset Name: MGH09 (MGH09.dat) > > File Format: ASCII > Starting Values (lines 41 to 44) > Certified Values (lines 41 to 49) > Data (lines 61 to 71) > > Procedure: Nonlinear Least Squares Regression > > Description: This problem was found to be difficult for some very > good algorithms. There is a local minimum at (+inf, > -14.07..., -inf, -inf) with final sum of squares > 0.00102734.... > > See More, J. J., Garbow, B. S., and Hillstrom, K. E. > (1981). Testing unconstrained optimization software. > ACM Transactions on Mathematical Software. 7(1): > pp. 17-41. > > Reference: Kowalik, J.S., and M. R. Osborne, (1978). > Methods for Unconstrained Optimization Problems. > New York, NY: Elsevier North-Holland. > > Data: 1 Response (y) > 1 Predictor (x) > 11 Observations > Higher Level of Difficulty > Generated Data > > Model: Rational Class (linear/quadratic) > 4 Parameters (b1 to b4) > > y = b1*(x**2+x*b2) / (x**2+x*b3+b4) + e > > > > Starting values Certified Values > > Start 1 Start 2 Parameter Standard Deviation > b1 = 25 0.25 1.9280693458E-01 1.1435312227E-02 > b2 = 39 0.39 1.9128232873E-01 1.9633220911E-01 > b3 = 41.5 0.415 1.2305650693E-01 8.0842031232E-02 > b4 = 39 0.39 1.3606233068E-01 9.0025542308E-02 > > Residual Sum of Squares: 3.0750560385E-04 > Residual Standard Deviation: 6.6279236551E-03 > Degrees of Freedom: 7 > Number of Observations: 11 > */ . . clear . . scalar N = 11 . scalar df_r = 7 . scalar df_m = 4 . . scalar rss = 3.0750560385E-04 . scalar rmse = 6.6279236551E-03 . . scalar b1 = 1.9280693458E-01 . scalar seb1 = 1.1435312227E-02 . scalar b2 = 1.9128232873E-01 . scalar seb2 = 1.9633220911E-01 . scalar b3 = 1.2305650693E-01 . scalar seb3 = 8.0842031232E-02 . scalar b4 = 1.3606233068E-01 . scalar seb4 = 9.0025542308E-02 . . qui input double(y x) . . /* The following starting values led to convergence problems: > > nl ( y = {b1}*(x^2 + x*{b2}) / (x^2 + x*{b3} + {b4}) ), /// > init(b1 25 b2 39 b3 41.5 b4 39) > > */ . . nl ( y = {b1}*(x^2 + x*{b2}) / (x^2 + x*{b3} + {b4}) ), /// > init(b1 0.25 b2 0.39 b3 0.415 b4 0.39) eps(1e-10) (obs = 11) Iteration 0: residual SS = .0052326 Iteration 1: residual SS = .0015957 Iteration 2: residual SS = .0010585 Iteration 3: residual SS = .0003847 Iteration 4: residual SS = .0003105 Iteration 5: residual SS = .0003095 Iteration 6: residual SS = .000308 Iteration 7: residual SS = .0003077 Iteration 8: residual SS = .0003076 Iteration 9: residual SS = .0003075 Iteration 10: residual SS = .0003075 Iteration 11: residual SS = .0003075 Iteration 12: residual SS = .0003075 Iteration 13: residual SS = .0003075 Iteration 14: residual SS = .0003075 Iteration 15: residual SS = .0003075 Iteration 16: residual SS = .0003075 Iteration 17: residual SS = .0003075 Iteration 18: residual SS = .0003075 Iteration 19: residual SS = .0003075 Iteration 20: residual SS = .0003075 Iteration 21: residual SS = .0003075 Iteration 22: residual SS = .0003075 Iteration 23: residual SS = .0003075 Iteration 24: residual SS = .0003075 Iteration 25: residual SS = .0003075 Iteration 26: residual SS = .0003075 Iteration 27: residual SS = .0003075 Iteration 28: residual SS = .0003075 Iteration 29: residual SS = .0003075 Iteration 30: residual SS = .0003075 Iteration 31: residual SS = .0003075 Iteration 32: residual SS = .0003075 Iteration 33: residual SS = .0003075 Iteration 34: residual SS = .0003075 Iteration 35: residual SS = .0003075 Iteration 36: residual SS = .0003075 Iteration 37: residual SS = .0003075 Iteration 38: residual SS = .0003075 Iteration 39: residual SS = .0003075 Source | SS df MS -------------+------------------------------ Number of obs = 11 Model | .148105674 4 .037026419 R-squared = 0.9979 Residual | .000307506 7 .000043929 Adj R-squared = 0.9967 -------------+------------------------------ Root MSE = .0066279 Total | .14841318 11 .013492107 Res. dev. = -84.11739 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- /b1 | .1928069 .0114353 16.86 0.000 .1657667 .2198472 /b2 | .1912823 .1963322 0.97 0.362 -.2729695 .6555341 /b3 | .1230565 .080842 1.52 0.172 -.0681045 .3142175 /b4 | .1360623 .0900255 1.51 0.174 -.0768143 .3489389 ------------------------------------------------------------------------------ . . 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 ( > ) /* > */ [b1]_se[_cons] seb1 [b2]_se[_cons] seb2 [b3]_se[_cons] seb3 [b4]_se[_cons] > seb4 () /* > */ e(rmse) rmse e(rss) rss [b1]_b[_cons] 8.4 [b2]_b[_cons] 7.0 [b3]_b[_cons] 7.6 [b4]_b[_cons] 7.2 ------------------------- min 7.0 [b1]_se[_cons] 7.5 [b2]_se[_cons] 6.5 [b3]_se[_cons] 6.5 [b4]_se[_cons] 7.1 ------------------------- min 6.5 e(rmse) 11.1 e(rss) 11.6 . . end of do-file