update-methods            package:stats4            R Documentation

_M_e_t_h_o_d_s _f_o_r _F_u_n_c_t_i_o_n '_u_p_d_a_t_e' _i_n _P_a_c_k_a_g_e '_s_t_a_t_s_4'

_D_e_s_c_r_i_p_t_i_o_n:

     Update '"mle"' objects.

_U_s_a_g_e:

     ## S4 method for signature 'mle':
     update(object, ..., evaluate = TRUE)

_A_r_g_u_m_e_n_t_s:

  object: An existing fit.

     ...: Additional arguments to the call, or arguments with changed
          values. Use 'name=NULL' to remove the argument 'name'.

evaluate: If true evaluate the new call else return the call.

_M_e_t_h_o_d_s:


     _o_b_j_e_c_t = "_A_N_Y" Generic function: see 'update'.

     _o_b_j_e_c_t = "_m_l_e" Update a fit.

_E_x_a_m_p_l_e_s:

     x <- 0:10
     y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
     ll <- function(ymax=15, xhalf=6)
         -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE))
     fit <- mle(ll)
     ## note the recorded call contains ..1, a problem with S4 dispatch
     update(fit, fixed=list(xhalf=3))

