gam2objective              package:mgcv              R Documentation

_O_b_j_e_c_t_i_v_e _f_u_n_c_t_i_o_n_s _f_o_r _G_A_M _s_m_o_o_t_h_i_n_g _p_a_r_a_m_e_t_e_r _e_s_t_i_m_a_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     Estimation of GAM smoothing parameters is most stable if
     optimization of the UBRE or GCV score is outer to the penalized
     iteratively re-weighted least squares scheme used to estimate the
     model given smoothing  parameters. These functions evaluate the
     GCV/UBRE score of a GAM model, given smoothing parameters, in a
     manner sutable for use by 'optim' or 'nlm'. Not normally called
     directly, but rather service routines for 'gam.outer'.

_U_s_a_g_e:

     gam2objective(lsp,args,printWarn=FALSE)
     gam2derivative(lsp,args)
     gam3objective(lsp,args)

_A_r_g_u_m_e_n_t_s:

     lsp: The log smoothing parameters.

    args: List of arguments required to call 'gam.fit2'.

printWarn: Should 'gam.fit2' print some warnings? Used to suppress
          warnings that are only of interest for the final fitted
          model, until that model is reached.

_D_e_t_a_i_l_s:

     'gam2objective' and 'gam2derivative' are functions suitable for
     calling by 'optim', to evaluate the GCV/UBRE score and it's
     derivatives w.r.t. log smoothing parameters.

     'gam3objective' is an equaivalent to 'gam2objective', suitable for
     optimization by 'nlm' - derivatives of the GCV/UBRE function are
     calculated and returned as attributes.

     The basic idea of optimizing smoothing parameters `outer' to the
     P-IRLS loop was first proposed in O'Sullivan et al. (1986).

_A_u_t_h_o_r(_s):

     Simon N. Wood simon.wood@r-project.org

_R_e_f_e_r_e_n_c_e_s:

     O 'Sullivan, Yandall & Raynor (1986) Automatic smoothing of
     regression functions in generalized linear models. J. Amer.
     Statist. Assoc. 81:96-103.

     <URL: http://www.stats.gla.ac.uk/~simon/>

_S_e_e _A_l_s_o:

     'gam.fit2',  'gam', 'mgcv', 'magic'

