MGH09                package:NISTnls                R Documentation

_M_o_r_e, _G_a_b_r_o_w _a_n_d _H_i_l_l_s_t_r_o_m _e_x_a_m_p_l_e _9

_D_e_s_c_r_i_p_t_i_o_n:

     The `MGH09' data frame has 11 rows and 2 columns giving

_A_r_g_u_m_e_n_t_s:

       y: A numeric vector of response values. 

       x: A numeric vector of input values. 

_F_o_r_m_a_t:

     This data frame contains the following columns:

_D_e_t_a_i_l_s:

     This problem was found to be difficult for some very  good
     algorithms.  There is a local minimum at (+inf, -14.07..., -inf,
     -inf) with final sum of squares  0.00102734....

     See More, J. J., Garbow, B. S., and Hillstrom, K. E.  (1981). 
     Testing unconstrained optimization software. ACM Transactions on
     Mathematical Software. 7(1):  pp. 17-41.

_S_o_u_r_c_e:

     Kowalik, J.S., and M. R. Osborne, (1978).   Methods for
     Unconstrained Optimization Problems.   New York, NY:  Elsevier
     North-Holland.

_E_x_a_m_p_l_e_s:

     data(MGH09)
     plot(y ~ x, data = MGH09)

     ## starting values for this attempt are ridiculous
     fm1 <- nls(y ~ b1*(x**2+x*b2) / (x**2+x*b3+b4),
                data = MGH09, trace = TRUE,
                start = c(b1 = 25, b2 = 39, b3 = 41.5, b4 = 39))

     fm2 <- nls(y ~ b1*(x**2+x*b2) / (x**2+x*b3+b4),
                data = MGH09, trace = TRUE,
                start = c(b1 = 0.25, b2 = 0.39, b3 = 0.415, b4 = 0.39))
     fm3 <- nls(y ~ cbind(x, x**2) / (x**2+x*b3+b4),
                data = MGH09, trace = TRUE, algorithm = "plinear",
                start = c(b3 = 41.5, b4 = 39))
     fm4 <- nls(y ~ cbind(x, x**2) / (x**2+x*b3+b4),
                data = MGH09, trace = TRUE, algorithm = "plinear",
                start = c(b3 = 0.415, b4 = 0.39))

