fdHess                 package:nlme                 R Documentation

_F_i_n_i_t_e _d_i_f_f_e_r_e_n_c_e _H_e_s_s_i_a_n

_D_e_s_c_r_i_p_t_i_o_n:

     Evaluate an approximate Hessian and gradient of a scalar function
     using finite differences.

_U_s_a_g_e:

     fdHess(pars, fun, ..., .relStep=(.Machine$double.eps)^(1/3), minAbsPar=0)

_A_r_g_u_m_e_n_t_s:

    pars: the numeric values of the parameters at which to evaluate the
          function 'fun' and its derivatives.

     fun: a function depending on the parameters 'pars' that returns a
          numeric scalar.

     ...: Optional additional arguments to 'fun'

.relStep: The relative step size to use in the finite differences.  It
          defaults to the cube root of '.Machine$double.eps'

minAbsPar: The minimum magnitude of a parameter value that is
          considered non-zero.  It defaults to zero meaning that any
          non-zero value will be considered different from zero.

_D_e_t_a_i_l_s:

     This function uses a second-order response surface design known as
     a Koschal design to determine the parameter values at which the
     function is evaluated.

_V_a_l_u_e:

     A list with components 

    mean: the value of function 'fun' evaluated at the parameter values
          'pars'

gradient: an approximate gradient

 Hessian: a matrix whose upper triangle containst an approximate
          Hessian.

_A_u_t_h_o_r(_s):

     Jose Pinheiro jcp@research.bell-labs.com, Douglas Bates
     bates@stat.wisc.edu

_E_x_a_m_p_l_e_s:

     fdHess(c(12.3, 2.34), function(x) x[1]*(1-exp(-0.4*x[2])))

