gam.outer                package:mgcv                R Documentation

_M_i_n_i_m_i_z_e _G_C_V _o_r _U_B_R_E _s_c_o_r_e _o_f _a _G_A_M _u_s_i_n_g '_o_u_t_e_r' _i_t_e_r_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.

     This routine optimizes a GCV or UBRE score in this way. Basically
     the GCV or UBRE score is evaluated for each trial set of smoothing
     parameters by estimating the GAM for those smoothing parameters.
     The score is minimized w.r.t. the parameters numerically, using
     'newton' (default), 'bfgs', 'optim' or 'nlm'. Exact (first and
     second) derivatives of the score can be used by fitting with
     'gam.fit3'. This improves efficiency and reliability relative to
     relying on finite difference derivatives.  

     Not normally called directly, but rather a service routine for
     'gam'.

_U_s_a_g_e:

     gam.outer(lsp,fscale,family,control,method,gamma,G,...)

_A_r_g_u_m_e_n_t_s:

     lsp: The log smoothing parameters.

  fscale: Typical scale of the GCV or UBRE/AIC score.

  family: the model family.

 control: control argument to pass to 'gam.fit' if pure finite
          differencing is being used.

  method: method list returned from 'gam.method'. This defines the
          optimization method to use.

   gamma: The degree of freedom inflation factor for the GCV/UBRE/AIC
          score.

       G: List produced by 'gam.setup', containing most of what's
          needed to actually fit a GAM.

     ...: other arguments, typically for passing on to 'gam.fit3'
          (ultimately).

_D_e_t_a_i_l_s:

     See Wood (2008) for full details on `outer iteration'.

_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:

     Wood, S.N. (2008) Fast stable direct fitting and smoothness
     selection for generalized additive models. J.R.Statist.Soc.B
     70(3):495-518

     <URL: http://www.maths.bath.ac.uk/~sw283/>

_S_e_e _A_l_s_o:

     'gam.fit3',  'gam', 'mgcv', 'magic'

