___  ____  ____  ____  ____ (R)
 /__    /   ____/   /   ____/
___/   /   /___/   /   /___/   11.0   Copyright 1984-2009
  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 network perpetual license:
       Serial number:  999
         Licensed to:  Brian P. Poi
                       StataCorp LP

Notes:
      1.  (-m# option or -set memory-) 10.00 MB allocated to data
      2.  Command line editing disabled
      3.  Stata running in batch mode


running /home/bpp/bin/profile.do ...

. do chwirut1.do 

. /* NIST StRD benchmark from http://www.nist.gov/itl/div898/strd/
> 
> Nonlinear Regression
> 
> Difficulty=Lower  Exponential  k=3  N=214  Observed
> 
> Dataset Name:  Chwirut1          (Chwirut1.dat)
> 
> File Format:   ASCII
>                Starting Values   (lines 41 to  43)
>                Certified Values  (lines 41 to  48)
>                Data              (lines 61 to 274)
> 
> Procedure:     Nonlinear Least Squares Regression
> 
> Description:   These data are the result of a NIST study involving
>                ultrasonic calibration.  The response variable is
>                ultrasonic response, and the predictor variable is
>                metal distance.
> 
> Reference:     Chwirut, D., NIST (197?).
>                Ultrasonic Reference Block Study.
> 
> Data:          1 Response Variable  (y = ultrasonic response)
>                1 Predictor Variable (x = metal distance)
>                214 Observations
>                Lower Level of Difficulty
>                Observed Data
> 
> Model:         Exponential Class
>                3 Parameters (b1 to b3)
> 
>                y = exp[-b1*x]/(b2+b3*x)  +  e
> 
> 
>           Starting values                  Certified Values
> 
>         Start 1     Start 2           Parameter     Standard Deviation
>   b1 =   0.1         0.15          1.9027818370E-01  2.1938557035E-02
>   b2 =   0.01        0.008         6.1314004477E-03  3.4500025051E-04
>   b3 =   0.02        0.010         1.0530908399E-02  7.9281847748E-04
> 
> Residual Sum of Squares:                    2.3844771393E+03
> Residual Standard Deviation:                3.3616721320E+00
> Degrees of Freedom:                               211
> Number of Observations:                           214
> */
. 
. clear

. 
. scalar N         = 214

. scalar df_r      = 211

. scalar df_m      = 3

. 
. scalar rss       = 2.3844771393E+03

. scalar rmse      = 3.3616721320E+00

. 
. scalar b1        = 1.9027818370E-01

. scalar seb1      = 2.1938557035E-02

. scalar b2        = 6.1314004477E-03

. scalar seb2      = 3.4500025051E-04

. scalar b3        = 1.0530908399E-02

. scalar seb3      = 7.9281847748E-04

. 
. qui input double (y x)

. 
. nl ( y = exp(-{b1}*x)/({b2}+{b3}*x) ), init(b1 1 b2 .01 b3 .02) eps(1e-10)
(obs = 214)

Iteration 0:  residual SS =  103077.7
Iteration 1:  residual SS =  38669.29
Iteration 2:  residual SS =  5678.076
Iteration 3:  residual SS =   2453.61
Iteration 4:  residual SS =  2384.491
Iteration 5:  residual SS =  2384.477
Iteration 6:  residual SS =  2384.477
Iteration 7:  residual SS =  2384.477
Iteration 8:  residual SS =  2384.477
Iteration 9:  residual SS =  2384.477
Iteration 10:  residual SS =  2384.477

      Source |       SS       df       MS
-------------+------------------------------         Number of obs =       214
       Model |  313023.796     3  104341.265         R-squared     =    0.9924
    Residual |  2384.47714   211  11.3008395         Adj R-squared =    0.9923
-------------+------------------------------         Root MSE      =  3.361672
       Total |  315408.273   214  1473.87043         Res. dev.     =  1123.208

------------------------------------------------------------------------------
           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         /b1 |   .1902782   .0219386     8.67   0.000     .1470313     .233525
         /b2 |   .0061314    .000345    17.77   0.000     .0054513    .0068115
         /b3 |   .0105309   .0007928    13.28   0.000      .008968    .0120938
------------------------------------------------------------------------------

. 
. 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 () /*
> */ [b1]_se[_cons] seb1 [b2]_se[_cons] seb2 [b3]_se[_cons] seb3 () /*
> */ e(rmse) rmse e(rss) rss

[b1]_b[_cons]        7.6
[b2]_b[_cons]        8.0
[b3]_b[_cons]        7.8
-------------------------
min                  7.6

[b1]_se[_cons]       6.6
[b2]_se[_cons]       6.3
[b3]_se[_cons]       6.3
-------------------------
min                  6.3

e(rmse)             10.9
e(rss)              11.4

. 
end of do-file