MortalitySmooth
which
optimizes the smoothing parameter for penalized B-splines within the
function Mort2Dsmooth
.
Mort2Dsmooth_optimize(x, y, Z, offset, wei, psi2, Bx, By, nbx, nby, RTBx, RTBy, Px, Py, a.init, MON, TOL1, TOL2, RANGEx, RANGEy, MAX.IT, MET)
RANGEx
and RANGEy
in Mort2Dsmooth
with method
equal to 1 or 2 (BIC and AIC). It employs the
function cleversearch
from package svcm
in two
separate steps. First it searches using a rough grid (4 times
TOL2
) and the median of RANGEx
and RANGEy
as
starting lambdas. Afterwards it searches in the restricted areas
around the sub-optimal smoothing parameters, using a finer grid
defined by TOL2
. This procedure allows to find precise smoothing parameters in an efficient way: we do not explore the full ranges of possible lambda values, but we optimize each parameter in turn, moving at most one grid step up or down. Furthermore the two steps routine reduces the risk of finding sub-optimal smoothing parameters.
Mort2Dsmooth_update
,
Mort2Dsmooth_estimate
,
Mort2Dsmooth
.