/* NIST StRD benchmark from http://www.nist.gov/itl/div898/strd/ Nonlinear Regression Difficulty=Lower Exponential k=3 N=54 Observed Dataset Name: Chwirut2 (Chwirut2.dat) 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 (y = ultrasonic response) 1 Predictor (x = metal distance) 54 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.6657666537E-01 3.8303286810E-02 b2 = 0.01 0.008 5.1653291286E-03 6.6621605126E-04 b3 = 0.02 0.010 1.2150007096E-02 1.5304234767E-03 Residual Sum of Squares: 5.1304802941E+02 Residual Standard Deviation: 3.1717133040E+00 Degrees of Freedom: 51 Number of Observations: 54 */ clear scalar N = 54 scalar df_r = 51 scalar df_m = 3 scalar rss = 5.1304802941E+02 scalar rmse = 3.1717133040E+00 scalar b1 = 1.6657666537E-01 scalar seb1 = 3.8303286810E-02 scalar b2 = 5.1653291286E-03 scalar seb2 = 6.6621605126E-04 scalar b3 = 1.2150007096E-02 scalar seb3 = 1.5304234767E-03 qui input double (y x) 92.9000E0 0.500E0 57.1000E0 1.000E0 31.0500E0 1.750E0 11.5875E0 3.750E0 8.0250E0 5.750E0 63.6000E0 0.875E0 21.4000E0 2.250E0 14.2500E0 3.250E0 8.4750E0 5.250E0 63.8000E0 0.750E0 26.8000E0 1.750E0 16.4625E0 2.750E0 7.1250E0 4.750E0 67.3000E0 0.625E0 41.0000E0 1.250E0 21.1500E0 2.250E0 8.1750E0 4.250E0 81.5000E0 .500E0 13.1200E0 3.000E0 59.9000E0 .750E0 14.6200E0 3.000E0 32.9000E0 1.500E0 5.4400E0 6.000E0 12.5600E0 3.000E0 5.4400E0 6.000E0 32.0000E0 1.500E0 13.9500E0 3.000E0 75.8000E0 .500E0 20.0000E0 2.000E0 10.4200E0 4.000E0 59.5000E0 .750E0 21.6700E0 2.000E0 8.5500E0 5.000E0 62.0000E0 .750E0 20.2000E0 2.250E0 7.7600E0 3.750E0 3.7500E0 5.750E0 11.8100E0 3.000E0 54.7000E0 .750E0 23.7000E0 2.500E0 11.5500E0 4.000E0 61.3000E0 .750E0 17.7000E0 2.500E0 8.7400E0 4.000E0 59.2000E0 .750E0 16.3000E0 2.500E0 8.6200E0 4.000E0 81.0000E0 .500E0 4.8700E0 6.000E0 14.6200E0 3.000E0 81.7000E0 .500E0 17.1700E0 2.750E0 81.3000E0 .500E0 28.9000E0 1.750E0 end nl ( y = exp(-{b1}*x) / ({b2} + {b3}*x) ), /// init(b1 0.1 b2 0.01 b3 0.02) eps(1e-10) assert N == e(N) assert df_r == e(df_r) assert df_m == e(df_m) lrecomp _b[b1] b1 _b[b2] b2 _b[b3] b3 () /* */ _se[b1] seb1 _se[b2] seb2 _se[b3] seb3 () /* */ e(rmse) rmse e(rss) rss