/* NIST StRD benchmark from http://www.nist.gov/itl/div898/strd/ Nonlinear Regression Difficulty=Lower Exponential k=6 N=24 Generated Dataset Name: Lanczos3 (Lanczos3.dat) Procedure: Nonlinear Least Squares Regression Description: These data are taken from an example discussed in Lanczos (1956). The data were generated to 5-digits of accuracy using f(x) = 0.0951*exp(-x) + 0.8607*exp(-3*x) + 1.5576*exp(-5*x). Reference: Lanczos, C. (1956). Applied Analysis. Englewood Cliffs, NJ: Prentice Hall, pp. 272-280. Data: 1 Response (y) 1 Predictor (x) 24 Observations Lower Level of Difficulty Generated Data Model: Exponential Class 6 Parameters (b1 to b6) y = b1*exp(-b2*x) + b3*exp(-b4*x) + b5*exp(-b6*x) + e Starting values Certified Values Start 1 Start 2 Parameter Standard Deviation b1 = 1.2 0.5 8.6816414977E-02 1.7197908859E-02 b2 = 0.3 0.7 9.5498101505E-01 9.7041624475E-02 b3 = 5.6 3.6 8.4400777463E-01 4.1488663282E-02 b4 = 5.5 4.2 2.9515951832E+00 1.0766312506E-01 b5 = 6.5 4 1.5825685901E+00 5.8371576281E-02 b6 = 7.6 6.3 4.9863565084E+00 3.4436403035E-02 Residual Sum of Squares: 1.6117193594E-08 Residual Standard Deviation: 2.9923229172E-05 Degrees of Freedom: 18 Number of Observations: 24 */ clear scalar N = 24 scalar df_r = 18 scalar df_m = 6 scalar rss = 1.6117193594E-08 scalar rmse = 2.9923229172E-05 scalar b1 = 8.6816414977E-02 scalar seb1 = 1.7197908859E-02 scalar b2 = 9.5498101505E-01 scalar seb2 = 9.7041624475E-02 scalar b3 = 8.4400777463E-01 scalar seb3 = 4.1488663282E-02 scalar b4 = 2.9515951832E+00 scalar seb4 = 1.0766312506E-01 scalar b5 = 1.5825685901E+00 scalar seb5 = 5.8371576281E-02 scalar b6 = 4.9863565084E+00 scalar seb6 = 3.4436403035E-02 qui input double (y x) 2.5134E+00 0.00000E+00 2.0443E+00 5.00000E-02 1.6684E+00 1.00000E-01 1.3664E+00 1.50000E-01 1.1232E+00 2.00000E-01 0.9269E+00 2.50000E-01 0.7679E+00 3.00000E-01 0.6389E+00 3.50000E-01 0.5338E+00 4.00000E-01 0.4479E+00 4.50000E-01 0.3776E+00 5.00000E-01 0.3197E+00 5.50000E-01 0.2720E+00 6.00000E-01 0.2325E+00 6.50000E-01 0.1997E+00 7.00000E-01 0.1723E+00 7.50000E-01 0.1493E+00 8.00000E-01 0.1301E+00 8.50000E-01 0.1138E+00 9.00000E-01 0.1000E+00 9.50000E-01 0.0883E+00 1.00000E+00 0.0783E+00 1.05000E+00 0.0698E+00 1.10000E+00 0.0624E+00 1.15000E+00 end nl ( y = {b1}*exp(-{b2}*x) + {b3}*exp(-{b4}*x) + {b5}*exp(-{b6}*x) ), /// init(b1 1.2 b2 0.3 b3 5.6 b4 5.5 b5 6.5 b6 7.6) 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 /* */ _b[b4] b4 _b[b5] b5 _b[b6] b6 () /* */ _se[b1] seb1 _se[b2] seb2 _se[b3] seb3 /* */ _se[b4] seb4 _se[b5] seb5 _se[b6] seb6 () /* */ e(rmse) rmse e(rss) rss