home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Educational / R-0.49-MI / R-0.49-I / help / base / optimize < prev    next >
Encoding:
Text File  |  1997-04-23  |  1.6 KB  |  54 lines

  1.     
  2.     _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
  3.     
  4.          optimize(f=, interval=, lower=min(interval),
  5.                  upper=max(interval), maximum=FALSE,
  6.                  tol=.Machine$double.eps^0.25, ...)
  7.     
  8.     _A_r_g_u_m_e_n_t_s:
  9.     
  10.                f : the function to be optimized. The function is
  11.                    either minimized or maximized over its first
  12.                    argument depending on the value of maximum.
  13.     
  14.         interval : a vector containing the end-points of the
  15.                    interval to be searched for the minimum.
  16.     
  17.            lower : the lower end point of the interval to be
  18.                    searched.
  19.     
  20.            upper : the upper end point of the interval to be
  21.                    searched.
  22.     
  23.              tol : the desired accuracy.
  24.     
  25.     _D_e_s_c_r_i_p_t_i_o_n:
  26.     
  27.          The function optimize searches the interval from lower
  28.          to upper for a minimum or maximum of the function f
  29.          with respect to its first argument.
  30.     
  31.          The function uses Fortran code (from Netlib) based on
  32.          algorithms given in the reference.
  33.     
  34.     _V_a_l_u_e:
  35.     
  36.          A list with components minimum (or maximum) and objec-
  37.          tive which give the location of the minimum (or max-
  38.          imum) and the value of the function at that point.
  39.     
  40.     _R_e_f_e_r_e_n_c_e_s:
  41.     
  42.          Brent, R. (1973).  Algorithms for Minimization without
  43.          Derivatives.  Englewood Cliffs N.J.: Prentice-Hall.
  44.     
  45.     _S_e_e _A_l_s_o:
  46.     
  47.          nlm, uniroot.
  48.     
  49.     _E_x_a_m_p_l_e_s:
  50.     
  51.          f <- function (x,a) (x-a)^2
  52.          xmin <- optimize(f, c(0, 1), tol=0.0001, a=1/3)
  53.     
  54.