___ ____ ____ ____ ____ 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 misra1d.do . /* NIST/ITL StRD > Dataset Name: Misra1d (Misra1d.dat) > > File Format: ASCII > Starting Values (lines 41 to 42) > Certified Values (lines 41 to 47) > Data (lines 61 to 74) > > Procedure: Nonlinear Least Squares Regression > > Description: These data are the result of a NIST study regarding > dental research in monomolecular adsorption. The > response variable is volume, and the predictor > variable is pressure. > > Reference: Misra, D., NIST (1978). > Dental Research Monomolecular Adsorption Study. > > > > > > > > Data: 1 Response (y = volume) > 1 Predictor (x = pressure) > 14 Observations > Average Level of Difficulty > Observed Data > > Model: Miscellaneous Class > 2 Parameters (b1 and b2) > > y = b1*b2*x*((1+b2*x)**(-1)) + e > > > > Starting values Certified Values > > Start 1 Start 2 Parameter Standard Deviation > b1 = 500 450 4.3736970754E+02 3.6489174345E+00 > b2 = 0.0001 0.0003 3.0227324449E-04 2.9334354479E-06 > > Residual Sum of Squares: 5.6419295283E-02 > Residual Standard Deviation: 6.8568272111E-02 > Degrees of Freedom: 12 > Number of Observations: 14 > */ . . clear . . scalar N = 14 . scalar df_r = 12 . scalar df_m = 2 . . scalar rss = 5.6419295283E-02 . scalar rmse = 6.8568272111E-02 . . scalar b1 = 4.3736970754E+02 . scalar seb1 = 3.6489174345E+00 . scalar b2 = 3.0227324449E-04 . scalar seb2 = 2.9334354479E-06 . . qui input double(y x) . . nl ( y = {b1}*{b2}*x*( (1 + {b2}*x)^(-1) ) ), init(b1 500 b2 0.0001) eps(1e-1 > 0) (obs = 14) Iteration 0: residual SS = 10602.92 Iteration 1: residual SS = 9606.646 Iteration 2: residual SS = 460.899 Iteration 3: residual SS = 14.49105 Iteration 4: residual SS = .0801687 Iteration 5: residual SS = .0564193 Iteration 6: residual SS = .0564193 Iteration 7: residual SS = .0564193 Iteration 8: residual SS = .0564193 Source | SS df MS -------------+------------------------------ Number of obs = 14 Model | 33059.5767 2 16529.7883 R-squared = 1.0000 Residual | .056419295 12 .004701608 Adj R-squared = 1.0000 -------------+------------------------------ Root MSE = .0685683 Total | 33059.6331 14 2361.40236 Res. dev. = -37.46574 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- /b1 | 437.3697 3.648916 119.86 0.000 429.4194 445.32 /b2 | .0003023 2.93e-06 103.04 0.000 .0002959 .0003087 ------------------------------------------------------------------------------ . . 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 () /* > */ [b1]_se[_cons] seb1 [b2]_se[_cons] seb2 () /* > */ e(rmse) rmse e(rss) rss [b1]_b[_cons] 9.4 [b2]_b[_cons] 9.3 ------------------------- min 9.3 [b1]_se[_cons] 6.5 [b2]_se[_cons] 6.5 ------------------------- min 6.5 e(rmse) 11.1 e(rss) 11.2 . . . end of do-file