This routine optimizes a smoothness selection score in this way. Basically the
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
.
gam.outer(lsp,fscale,family,control,method,optimizer,
criterion,scale,gamma,G,...)
gam.fit
if pure
finite differencing is being used.gam
defining the smoothness criterion to use (but depending on whether or not scale known).gam
defining the numerical optimization method to use."UBRE"
,
"GCV"
, "GACV"
, "REML"
or "P-REML"
.mgcv:::gam.setup
, containing most of what's
needed to actually fit a GAM.gam.fit3
(ultimately).
gam.fit3
, gam
, mgcv
, magic