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])))

