___ ____ ____ ____ ____ 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 roszman1.do . /* NIST/ITL StRD > Dataset Name: Roszman1 (Roszman1.dat) > > File Format: ASCII > Starting Values (lines 41 to 44) > Certified Values (lines 41 to 49) > Data (lines 61 to 85) > > Procedure: Nonlinear Least Squares Regression > > Description: These data are the result of a NIST study involving > quantum defects in iodine atoms. The response > variable is the number of quantum defects, and the > predictor variable is the excited energy state. > The argument to the ARCTAN function is in radians. > > Reference: Roszman, L., NIST (19??). > Quantum Defects for Sulfur I Atom. > > > > > > > Data: 1 Response (y = quantum defect) > 1 Predictor (x = excited state energy) > 25 Observations > Average Level of Difficulty > Observed Data > > Model: Miscellaneous Class > 4 Parameters (b1 to b4) > > pi = 3.141592653589793238462643383279E0 > y = b1 - b2*x - arctan[b3/(x-b4)]/pi + e > > > Starting Values Certified Values > > Start 1 Start 2 Parameter Standard Deviation > b1 = 0.1 0.2 2.0196866396E-01 1.9172666023E-02 > b2 = -0.00001 -0.000005 -6.1953516256E-06 3.2058931691E-06 > b3 = 1000 1200 1.2044556708E+03 7.4050983057E+01 > b4 = -100 -150 -1.8134269537E+02 4.9573513849E+01 > > Residual Sum of Squares: 4.9484847331E-04 > Residual Standard Deviation: 4.8542984060E-03 > Degrees of Freedom: 21 > Number of Observations: 25 > */ . . clear . . scalar N = 25 . scalar df_r = 21 . scalar df_m = 4 . . scalar rss = 4.9484847331E-04 . scalar rmse = 4.8542984060E-03 . . scalar b1 = 2.0196866396E-01 . scalar seb1 = 1.9172666023E-02 . scalar b2 = -6.1953516256E-06 . scalar seb2 = 3.2058931691E-06 . scalar b3 = 1.2044556708E+03 . scalar seb3 = 7.4050983057E+01 . scalar b4 = -1.8134269537E+02 . scalar seb4 = 4.9573513849E+01 . *scalar pi = 3.141592653589793238462643383279 . . qui input double(y x) . . nl ( y = {b1} - {b2}*x - atan({b3}/(x-{b4}))/_pi ) , /// > init(b1 0.1 b2 -0.00001 b3 1000 b4 -100) eps(1e-10) (obs = 25) Iteration 0: residual SS = .0006527 Iteration 1: residual SS = .0004949 Iteration 2: residual SS = .0004948 Iteration 3: residual SS = .0004948 Iteration 4: residual SS = .0004948 Iteration 5: residual SS = .0004948 Iteration 6: residual SS = .0004948 Iteration 7: residual SS = .0004948 Source | SS df MS -------------+------------------------------ Number of obs = 25 Model | 4.74450091 4 1.18612523 R-squared = 0.9999 Residual | .000494848 21 .000023564 Adj R-squared = 0.9999 -------------+------------------------------ Root MSE = .0048543 Total | 4.74499576 25 .18979983 Res. dev. = -199.8064 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- /b1 | .2019687 .0191727 10.53 0.000 .1620969 .2418404 /b2 | -6.20e-06 3.21e-06 -1.93 0.067 -.0000129 4.72e-07 /b3 | 1204.456 74.05101 16.27 0.000 1050.458 1358.453 /b4 | -181.3427 49.57353 -3.66 0.001 -284.4365 -78.2489 ------------------------------------------------------------------------------ . . assert N == e(N) . . 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.1 [b2]_b[_cons] 7.4 [b3]_b[_cons] 8.2 [b4]_b[_cons] 7.7 ------------------------- min 7.4 [b1]_se[_cons] 6.6 [b2]_se[_cons] 6.8 [b3]_se[_cons] 6.4 [b4]_se[_cons] 6.5 ------------------------- min 6.4 e(rmse) 11.3 e(rss) 12.2 . . end of do-file