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

