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

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

     This data frame contains the following columns:

     _y A numeric vector of response values.

     _x A numeric vector of input values.


_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:

     Try <- function(expr) if (!inherits(val <- try(expr), "try-error")) val
     plot(y ~ x, data = MGH09)
     ## starting values for this attempt are ridiculous
     Try(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)))
     Try(fm1a <- nls(y ~ b1*(x**2+x*b2) / (x**2+x*b3+b4),
                data = MGH09, trace = TRUE, alg = "port",
                start = c(b1 = 25, b2 = 39, b3 = 41.5, b4 = 39)))

     Try(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)))
     Try(fm2a <- nls(y ~ b1*(x**2+x*b2) / (x**2+x*b3+b4),
                data = MGH09, trace = TRUE, alg = "port",
                start = c(b1 = 0.25, b2 = 0.39, b3 = 0.415, b4 = 0.39)))
     Try(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)))
     Try(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)))

