___ ____ ____ ____ ____ 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 misra1c.do . /* NIST/ITL StRD > Dataset Name: Misra1c (Misra1c.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. > > > > > > > > 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 * (1-(1+2*b2*x)**(-.5)) + e > > > > Starting values Certified Values > > Start 1 Start 2 Parameter Standard Deviation > b1 = 500 600 6.3642725809E+02 4.6638326572E+00 > b2 = 0.0001 0.0002 2.0813627256E-04 1.7728423155E-06 > > Residual Sum of Squares: 4.0966836971E-02 > Residual Standard Deviation: 5.8428615257E-02 > Degrees of Freedom: 12 > Number of Observations: 14 > */ . . clear . . scalar N = 14 . scalar df_r = 12 . scalar df_m = 2 . . scalar rss = 4.0966836971E-02 . scalar rmse = 5.8428615257E-02 . . scalar b1 = 6.3642725809E+02 . scalar seb1 = 4.6638326572E+00 . scalar b2 = 2.0813627256E-04 . scalar seb2 = 1.7728423155E-06 . . qui input double(y x) . . nl ( y = {b1} * (1 - (1 + 2*{b2}*x)^(-.5)) ), /// > init(b1 500 b2 0.0001) eps(1e-10) (obs = 14) Iteration 0: residual SS = 8452.237 Iteration 1: residual SS = 138.0299 Iteration 2: residual SS = .0596393 Iteration 3: residual SS = .0409752 Iteration 4: residual SS = .0409668 Iteration 5: residual SS = .0409668 Iteration 6: residual SS = .0409668 Source | SS df MS -------------+------------------------------ Number of obs = 14 Model | 33059.5921 2 16529.7961 R-squared = 1.0000 Residual | .040966837 12 .003413903 Adj R-squared = 1.0000 -------------+------------------------------ Root MSE = .0584286 Total | 33059.6331 14 2361.40236 Res. dev. = -41.94642 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- /b1 | 636.4273 4.663831 136.46 0.000 626.2656 646.5889 /b2 | .0002081 1.77e-06 117.40 0.000 .0002043 .000212 ------------------------------------------------------------------------------ . . 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.8 [b2]_b[_cons] 9.7 ------------------------- min 9.7 [b1]_se[_cons] 6.5 [b2]_se[_cons] 6.5 ------------------------- min 6.5 e(rmse) 11.2 e(rss) 11.1 . . . end of do-file