controlMethod {singleRcapture} | R Documentation |
Control parameters for regression
Description
controlMethod
constructs a list with all necessary
control parameters for regression fitting in
estimatePopsizeFit
and estimatePopsize
.
Usage
controlMethod(
epsilon = 1e-08,
maxiter = 1000,
verbose = 0,
printEveryN = 1L,
coefStart = NULL,
etaStart = NULL,
optimMethod = "Nelder-Mead",
silent = FALSE,
optimPass = FALSE,
stepsize = 1,
checkDiagWeights = TRUE,
weightsEpsilon = 1e-08,
momentumFactor = 0,
saveIRLSlogs = FALSE,
momentumActivation = 5,
criterion = c("coef", "abstol", "reltol")
)
Arguments
epsilon |
tolerance for fitting algorithms by default 1e-8 .
|
maxiter |
maximum number of iterations.
|
verbose |
value indicating whether to trace steps of fitting algorithm for
IRLS fitting method different values of verbose give the following information:
1 – Returns information on the number of current
iteration and current log-likelihood.
2 – Returns information on vector of regression parameters
at current iteration (and all of the above).
3 – Returns information on reduction of log-likelihood
at current iteration (and all of the above).
4 – Returns information on value of log-likelihood function gradient
at current iteration (and all of the above).
5 – Returns information on convergence criterion and values that are
taken into account when considering convergence (and all of the above).
if optim method was chosen verbose will be passed to stats::optim() as trace.
|
printEveryN |
integer value indicating how often to print information
specified in verbose , by default set to 1 .
|
coefStart , etaStart |
initial parameters for regression coefficients
or linear predictors if NULL . For IRLS fitting only etaStart
is needed so if coefStart is provided it will be converted to etaStart ,
for optim fitting coefStart is necessary and argument etaStart
will be ignored.
|
optimMethod |
method of stats::optim() used "Nelder-Mead" is the default .
|
silent |
logical, indicating whether warnings in IRLS method should be suppressed.
|
optimPass |
optional list of parameters passed to stats::optim(..., control = optimPass)
if FALSE then list of control parameters will be inferred from other parameters.
|
stepsize |
only for IRLS , scaling of updates to beta vector
lower value means slower convergence but more accuracy by default 1.
In general if fitting algorithm fails lowering this value tends to
be most effective at correcting it.
|
checkDiagWeights |
logical value indicating whether to check if diagonal
elements of working weights matrixes in IRLS are sufficiently positive
so that these matrixes are positive defined. By default TRUE .
|
weightsEpsilon |
small number to ensure positive definedness of weights matrixes.
Only matters if checkDiagWeights is set to TRUE .
By default 1e-8 .
|
momentumFactor |
experimental parameter in IRLS only allowing for
taking previous step into account at current step, i.e instead of
updating regression parameters as:
\[\boldsymbol{\beta}_{(a)} =
\boldsymbol{\beta}_{(a-1)} + \text{stepsize} \cdot \text{step}_{(a)}\]
the update will be made as:
\[
\boldsymbol{\beta}_{(a)} = \boldsymbol{\beta}_{(a-1)} + \text{stepsize}
\cdot (\text{step}_{(a)} + \text{momentum}\cdot\text{step}_{(a-1)})\]
|
saveIRLSlogs |
logical value indicating if information specified in
verbose should be saved to output object, by default FALSE .
|
momentumActivation |
the value of log-likelihood reduction bellow
which momentum will apply.
|
criterion |
criterion used to determine convergence in IRLS ,
multiple values may be provided. By default c("coef", "abstol") .
|
Value
List with selected parameters, it is also possible to call list directly.
Author(s)
Piotr Chlebicki, Maciej Beręsewicz
See Also
estimatePopsize()
estimatePopsizeFit()
controlModel()
controlPopVar()
[Package
singleRcapture version 0.2.1.2
Index]