fmle                 package:FLCore                 R Documentation

_M_e_t_h_o_d _f_m_l_e

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

     The 'fmle' method fits the model specified in an 'FLModel' object
     using MLE by minimizing the negative of the log-likelihood
     function, in the 'logl' slot, through calls to the 'optim'
     minimizaton routine.

     For a given model and log-likelihood function, the 'fmle' method
     will use the  'optim' function in R to calculate the parameter
     vector which maximises the log- likelihood (and, hence,  the
     likelihood function) and is as such the optimum parameter  value
     for the given problem  and data.

     Be advised that for non-informative of conflicting data the
     maximum likelihood estimate  can  be dependent on the initial
     starting value and if we begin the optimiser with a  poor initial
     estimate it may converge falsely. Always try multiple start points
     and be  assured that you ave found the true MLE.

_G_e_n_e_r_i_c _f_u_n_c_t_i_o_n:

     fmle(object,start)

_M_e_t_h_o_d_s:


      _s_i_g_n_a_t_u_r_e(_o_b_j_e_c_t=_A_N_Y,_s_t_a_r_t=_m_i_s_s_i_n_g) : Generic method.

      _s_i_g_n_a_t_u_r_e(_o_b_j_e_c_t=_F_L_M_o_d_e_l,_s_t_a_r_t=_A_N_Y) : Input object of class
          'FLModel' contains input data, logl function and function to
          provide initial values.

      _s_i_g_n_a_t_u_r_e(_o_b_j_e_c_t=_F_L_M_o_d_e_l,_s_t_a_r_t=_F_L_P_a_r) : Input object of class
          'FLModel' contains input data and logl function, but fitting
          is started from parameter estimates in the 'FLPar' object
          provided.

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

     The FLR Team

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

     FLComp

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

     # use an example FLModel object
     data(nsher)

     summary(nsher)

     # inspect the logl function
     logl(nsher)

     # and the function providing initial values to the optimizer
     initial(nsher)

     # lower and upper limits for the parameters are set, and used if method
     # 'L-BFGS-B' is used in the call to optim, as is default in fmle
     lower(nsher)
     upper(nsher)

     # fit it with fmle
     nsher <- fmle(nsher)

     # fixed values can be chosen for any parameter
     nsher_fixed_a <- fmle(nsher, fixed=list(a=125))

     # and results compared, for example using AIC
     AIC(nsher)
     AIC(nsher_fixed_a)

     ## Not run: 
     # an initial run with one optimization method, e.g. 'SANN'
     nsher_one <- fmle(nsher, method='SANN')

     # can then be used as starting value for other runs
     # This might fail if
     nsher_two <- fmle(nsher_one, start=params(nsher_one), method='L-BFGS-B')
     ## End(Not run)

