This is an internal function of package scam
which allows
control of the numerical options for fitting a SCAM.
scam.control(maxit = 200, maxHalf=30, devtol.fit=1e-7, steptol.fit=1e-7,
keepData=FALSE,efs.lspmax=15,efs.tol=.1, nlm=list(),optim=list(),
bfgs=list(), trace =FALSE, print.warn=FALSE,b.notexp=1, threshold.notexp=20)
Maximum number of IRLS iterations to perform used in scam.fit
.
If a step of the BFGS optimization method leads
to a worse penalized deviance, then the step length of the model coefficients is halved. This is
the number of halvings to try before giving up used in bfgs_gcv.ubre
.
A positive scalar giving the convergence control for the model fitting algorithm in scam.fit
.
A positive scalar giving the tolerance at which the scaled distance between
two successive iterates is considered close enough to zero to terminate the model fitting algorithm in scam.fit
.
Should a copy of the original data
argument be kept in the scam
object?
maximum log smoothing parameters to allow under extended Fellner Schall smoothing parameter optimization.
change in GCV to count as negligible when testing for EFS convergence. If the step is small and the last 3 steps led to a GCV change smaller than this, then stop.
list of control parameters to pass to nlm
if this is
used for outer estimation of smoothing parameters (not default).
list of control parameters to pass to optim
if this
is used for outer estimation of smoothing parameters (not default).
list of control parameters to pass to default BFGS optimizer used for outer estimation of log smoothing parameters.
turns on or off some de-bugging information.
when set to FALSE
turns off printing warning messages for step halving under non-finite exponentiated coefficients, non-finite deviance and/or if mu
or eta
are out of bounds.
parameter b
of the model coefficients re-parameterization softPlus()
function used as the notExp()
function in place of exp()
to ensure positivity.
parameter threshold
of the softPlus()
function used as the notExp()
function. The implementation reverts to the linear function when coef*b > threshold
.
Natalya Pya Arnqvist nat.pya@gmail.com based partly on gam.control
by Simon Wood
Outer iteration is used to estimate smoothing parameters of SCAM by GCV/UBRE score optimization. The default procedure is the built-in BFGS method which is controlled by the list bfgs
with the following elements: steptol.bfgs
(default 1e-7) is the relative convergence tolerance;
gradtol.bfgs
(default 6.0554*1e-6) is a tolerance at which the gradient is considered to be close enougth to 0 to terminate the BFGS algorithm;
maxNstep
is a positive scalar which gives the maximum allowable step length (default 5);
maxHalf
gives the maximum number of step halving in "backtracking" to permit before giving up(default 30);
check.analytical
is logical whether the analytical gradient of GCV/UBRE should be checked numerically (default FALSE
);
del
is an increment for finite differences when checking analytical gradients (default 1e-4).
If outer iteration using nlm
is used for fitting, then the control list nlm
stores control arguments
for calls to routine nlm
. As in gam.control
the list has the following named elements: ndigit
is the number
of significant digits in the GCV/UBRE score; gradtol
is the tolerance used to judge convergence of the gradient of the GCV/UBRE score to zero
(default 1e-6); stepmax
is the maximum allowable log smoothing parameter step (default 2);
steptol
is the minimum allowable step length (default 1e-4);
iterlim
is the maximum number of optimization steps allowed (default 200);
check.analyticals
indicates whether the built in exact derivative calculations should be checked numerically (default FALSE
).
Any of these which are not supplied and named in the list are set to their default values.
Outer iteration using optim
is controlled using list optim
, which currently has one element: factr
which takes default value 1e7.
Pya, N. and Wood, S.N. (2015) Shape constrained additive models. Statistics and Computing, 25(3), 543-559
Pya, N. (2010) Additive models with shape constraints. PhD thesis. University of Bath. Department of Mathematical Sciences
Wood, S.N. (2011) Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. Journal of the Royal Statistical Society (B) 73(1):3-36
scam
, scam.fit
, gam.control