/* 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) 0.252429 -4868.68 0.252141 -4868.09 0.251809 -4867.41 0.297989 -3375.19 0.296257 -3373.14 0.295319 -3372.03 0.339603 -2473.74 0.337731 -2472.35 0.333820 -2469.45 0.389510 -1894.65 0.386998 -1893.40 0.438864 -1497.24 0.434887 -1495.85 0.427893 -1493.41 0.471568 -1208.68 0.461699 -1206.18 0.461144 -1206.04 0.513532 -997.92 0.506641 -996.61 0.505062 -996.31 0.535648 -834.94 0.533726 -834.66 0.568064 -710.03 0.612886 -530.16 0.624169 -464.17 end nl ( y = {b1} - {b2}*x - atan({b3}/(x-{b4}))/_pi ) , /// init(b1 0.1 b2 -0.00001 b3 1000 b4 -100) eps(1e-10) 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