

optimize {base}                              R Documentation

_O_n_e _D_i_m_e_n_s_i_o_n_a_l _O_p_t_i_m_i_z_a_t_i_o_n

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

     The function `optimize' searches the interval from
     `lower' to `upper' for a minimum or maximum of the
     function `f' with respect to its first argument.

     It uses Fortran code (from Netlib) based on algorithms
     given in the reference.

     `optimise' is an alias for `optimize'.

_U_s_a_g_e_:

     optimize(f=, interval=, lower=min(interval),
             upper=max(interval), maximum=FALSE,
             tol=.Machine$double.eps^0.25, ...)
     optimise(f=, interval=, lower=min(interval),
             upper=max(interval), maximum=FALSE,
             tol=.Machine$double.eps^0.25, ...)

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

       f: the function to be optimized. The function is
          either minimized or maximized over its first argu-
          ment depending on the value of `maximum'.

interval: a vector containing the end-points of the interval
          to be searched for the minimum.

   lower: the lower end point of the interval to be
          searched.

   upper: the upper end point of the interval to be
          searched.

     tol: the desired accuracy.

     ...: additional arguments to `f'.

_V_a_l_u_e_:

     A list with components `minimum' (or `maximum') and
     `objective' which give the location of the minimum (or
     maximum) and the value of the function at that point.

_R_e_f_e_r_e_n_c_e_s_:

     Brent, R. (1973).  Algorithms for Minimization without
     Derivatives.  Englewood Cliffs N.J.: Prentice-Hall.

_S_e_e _A_l_s_o_:

     `nlm', `uniroot'.

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

     f <- function (x,a) (x-a)^2
     xmin <- optimize(f, c(0, 1), tol=0.0001, a=1/3)
     xmin

