___ ____ ____ ____ ____ 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 dwood.do . /* NIST StRD benchmark from http://www.nist.gov/itl/div898/strd/ > > Nonlinear Regression > > Difficulty=Lower Miscellaneous k=2 N=6 Observed > > Dataset Name: DanielWood (DanielWood.dat) > > Procedure: Nonlinear Least Squares Regression > > Description: These data and model are described in Daniel and Wood > (1980), and originally published in E.S.Keeping, > "Introduction to Statistical Inference," Van Nostrand > Company, Princeton, NJ, 1962, p. 354. The response > variable is energy radieted from a carbon filament > lamp per cm**2 per second, and the predictor variable > is the absolute temperature of the filament in 1000 > degrees Kelvin. > > Reference: Daniel, C. and F. S. Wood (1980). > Fitting Equations to Data, Second Edition. > New York, NY: John Wiley and Sons, pp. 428-431. > > > Data: 1 Response Variable (y = energy) > 1 Predictor Variable (x = temperature) > 6 Observations > Lower Level of Difficulty > Observed Data > > Model: Miscellaneous Class > 2 Parameters (b1 and b2) > > y = b1*x**b2 + e > > > > Starting values Certified Values > > Start 1 Start 2 Parameter Standard Deviation > b1 = 1 0.7 7.6886226176E-01 1.8281973860E-02 > b2 = 5 4 3.8604055871E+00 5.1726610913E-02 > > Residual Sum of Squares: 4.3173084083E-03 > Residual Standard Deviation: 3.2853114039E-02 > Degrees of Freedom: 4 > Number of Observations: 6 > */ . . clear . . scalar N = 6 . scalar df_r = 4 . scalar df_m = 2 . . scalar rss = 4.3173084083E-03 . scalar rmse = 3.2853114039E-02 . . scalar b1 = 7.6886226176E-01 . scalar seb1 = 1.8281973860E-02 . scalar b2 = 3.8604055871E+00 . scalar seb2 = 5.1726610913E-02 . . qui input double (y x) . . nl ( y = {b1}*x^{b2} ), init(b1 1 b2 5) eps(1e-10) (obs = 6) Iteration 0: residual SS = 149.7192 Iteration 1: residual SS = 4.610882 Iteration 2: residual SS = .0316845 Iteration 3: residual SS = .0043206 Iteration 4: residual SS = .0043173 Iteration 5: residual SS = .0043173 Iteration 6: residual SS = .0043173 Iteration 7: residual SS = .0043173 Iteration 8: residual SS = .0043173 Source | SS df MS Number of obs = 6 -------------+------------------------------ F( 2, 4) = 48138.09 Model | 103.913501 2 51.9567503 Prob > F = 0.0000 Residual | .004317308 4 .001079327 R-squared = 1.0000 -------------+------------------------------ Adj R-squared = 0.9999 Total | 103.917818 6 17.3196363 Root MSE = .0328531 Res. dev. = -26.39403 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- b1 | .7688623 .018282 42.06 0.000 .7181034 .8196211 b2 | 3.860406 .0517266 74.63 0.000 3.71679 4.004022 ------------------------------------------------------------------------------ (SEs, P values, CIs, and correlations are asymptotic approximations) . . assert N == e(N) . assert df_r == e(df_r) . assert df_m == e(df_m) . . lrecomp _b[b1] b1 _b[b2] b2 () /* > */ _se[b1] seb1 _se[b2] seb2 () /* > */ e(rmse) rmse e(rss) rss _b[b1] 8.6 _b[b2] 8.8 ------------------------- min 8.6 _se[b1] 6.5 _se[b2] 6.2 ------------------------- min 6.2 e(rmse) 11.2 e(rss) 11.7 . end of do-file