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 optim
or nlm
. Exact
derivatives of the score can be used by fitting with gam.fit2
,
which improves efficiency and reliability relative to relying solely on finite
difference derivatives.
Note that there is a choise between basing GCV/UBRE scores on the deviance or
the Pearson statistic: see gam.method
.
Not normally called directly, but rather a service routine for gam
.
gam.outer(lsp,fscale,family,control,method,gamma,G)
gam.fit
if pure
finite differencing is being used.gam.method
. This defines
the optimization method to use.gam.setup
, containing most of what's
needed to actually fit GAM.gam.fit2
, gam
, mgcv
, magic