mlefn                package:missreg                R Documentation

_A _m_o_d_i_f_i_e_d _N_e_w_t_o_n _m_a_x_i_m_i_s_e_r

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

     A function to maximise, minimise or find stationary values for a
     (general) function.  It was originally written to maximize a
     loglikelihood function so that is the language that is employed.

      'mlefn.control' and 'mlefn.control.inner' supply parameter values
     to control  the iterative process and reporting. They differ only
     in their defaults.

_U_s_a_g_e:

     mlefn(theta, loglkfn, control=mlefn.control(...), ...)

     mlefn.control(messg="", niter=20, tol=1e-08, guide="uphill",
           print.progress=2, max.eigenrat=0.05, n.earlyit=0,
           constrain="no", fixed=NULL, Aconstrain=NULL, 
           cconstrain=NULL, ...)

     mlefn.control.inner(messg="Inner:", niter=20, tol=1e-08, 
           guide="auto", print.progress=0, max.eigenrat=0.05, 
           n.earlyit=0, constrain="no", fixed=NULL, 
           Aconstrain=NULL, cconstrain=NULL, ...)

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

   theta: Starting values for the parameters of the loglikelhood
          function.

 loglkfn: An inner function to compute the loglikelihood and its
          derivatives. The values returned by this function must be a
          list with 'loglk', 'score' and 'inf'.  

   messg: A labelling string to be printed as a part of warnings etc. 
          Useful with nested calls to 'mlefn'.

   niter: Maximum number of iterations used. The default is 20.

     tol: Level of tolerance for checking the convergence.

   guide: Specification of the direction for convergence with the
          following choices:

          '"_u_p_h_i_l_l"' - seek a maximum;

          '"_d_o_w_n_h_i_l_l"' - seek a minimum;

          '"_n_o"' - straight Newton approach without using loglikelihood
                values to guide the search.

          '"_a_u_t_o"' - only used in 'mlefn.control.inner' when the inner
               function 'loglkfn' requires a call to 'mlefn' itself and
               we  want it to determine and supply a legitmate value
               for that (inner) call.

print.progress: A numeric value used to control the printing of error
          messages (if any); 0 should be used if no printing is
          required.

max.eigenrat: An argument used in the inner function 'greenstadt.step'
          to control the eigenvalues of the information matrix. This is
          the Greenstadt modification described in page 601 of Seber
          and Wild (1989). 

n.earlyit: Number of iterations to be treated as '"early"'; The default
          is 0.

constrain: Specification of constrain on the parameter estimates with
          the following choices:

          '"_n_o"' - no constrains;

          '"_f_i_x"' - fix some of the parameters at their starting
               values;

   fixed: A vector specifying the parameters to be fixed, indicated by
          their orders in 'theta'. Used only if 'constrain'='"fix"'. 

Aconstrain: an 'I' matrix with number of rows equal to the number of
          "fixed" parameters.  Used only if 'constrain'='"fix"'. 

cconstrain: A vector specifying the values of those "fixed" parameters. 
            Used only if 'constrain'='"fix"'. 

     ...: Further arguments passed to or from related functions.

_D_e_t_a_i_l_s:

     This is the base function to maximise, minimise or find stationary
     values for 'theta'  using the provided 'loglkfn' function. All
     semi-parametric maximum likelihood approaches we have proposed in
     'missreg' library require this function to obtain maximum
     likelihood estimates of parameters. See "Description of the
     'missreg' Library" for more details.

_V_a_l_u_e:

     A list with the following components. 

   theta: Updated parameter estimates at this iteration.

   loglk: Log-likelihood obtained from the current 'theta' values.

   score: Score vector obtained from the current 'theta' values.

     inf: Observed information matrix obtained from the curent 'theta'
          values.

constrscore: Constrained score vector if 'constrain="fix"'; otherwise
          'NULL'.

constrinf: Constrained observed information matrix if
          'constrain="fix"'; otherwise 'NULL'.

 counter: Number of iterations performed.

   error: A numeric value indicating the types of errors during
          iterations;  a value of 0 indicates no error.

_A_u_t_h_o_r(_s):

     Chris Wild, Yannan Jiang

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

     Nonlinear Regression, Seber and Wild,  1989. Wiley: New York. 
      Description of the 'missreg' Library, Wild and Jiang, 2007.

